Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
ohj1ht
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jasajuyl
ohj1ht
Commits
7cfe11d5
Commit
7cfe11d5
authored
1 year ago
by
Yli-Tainio Janne Sakri Juhani
Browse files
Options
Downloads
Patches
Plain Diff
Pelin lopputeksti
parent
8cd92b91
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
kolikkogoblin/.idea/.idea.kolikkogoblin/.idea/workspace.xml
+2
-10
2 additions, 10 deletions
kolikkogoblin/.idea/.idea.kolikkogoblin/.idea/workspace.xml
kolikkogoblin/kolikkogoblin/kolikkogoblin.cs
+33
-6
33 additions, 6 deletions
kolikkogoblin/kolikkogoblin/kolikkogoblin.cs
with
35 additions
and
16 deletions
kolikkogoblin/.idea/.idea.kolikkogoblin/.idea/workspace.xml
+
2
−
10
View file @
7cfe11d5
...
...
@@ -8,18 +8,8 @@
</component>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"0cb08879-2df4-4f3a-a1a9-8178f387d135"
name=
"Changes"
comment=
""
>
<change
afterPath=
"$PROJECT_DIR$/kolikkogoblin/content/goblinhyppaa.png"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/kolikkogoblin/content/goblinkavelee1.png"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/kolikkogoblin/content/goblinkavelee2.png"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/kolikkogoblin/content/goblinkavelee3.png"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/kolikkogoblin/content/goblinseisoo1.png"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/kolikkogoblin/content/taustamusikaali.wav"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/.idea.kolikkogoblin/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/.idea.kolikkogoblin/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/kolikkogoblin/content/goblin1.png"
beforeDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/kolikkogoblin/content/goblin2.png"
beforeDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/kolikkogoblin/content/goblin3.png"
beforeDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/kolikkogoblin/kolikkogoblin.cs"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/kolikkogoblin/kolikkogoblin.cs"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/kolikkogoblin/kolikkogoblin.csproj"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/kolikkogoblin/kolikkogoblin.csproj"
afterDir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
...
@@ -113,6 +103,8 @@
<workItem
from=
"1700419527544"
duration=
"1390000"
/>
<workItem
from=
"1700478161676"
duration=
"1913000"
/>
<workItem
from=
"1700510066280"
duration=
"2289000"
/>
<workItem
from=
"1700564843502"
duration=
"800000"
/>
<workItem
from=
"1700580111009"
duration=
"1786000"
/>
</task>
<servers
/>
</component>
...
...
This diff is collapsed.
Click to expand it.
kolikkogoblin/kolikkogoblin/kolikkogoblin.cs
+
33
−
6
View file @
7cfe11d5
...
...
@@ -37,6 +37,8 @@ public class Kolikkogoblin : PhysicsGame
};
private
static
readonly
String
[]
taso1
=
{
" "
,
" "
,
" EP "
,
" "
,
" M "
,
...
...
@@ -79,10 +81,21 @@ public class Kolikkogoblin : PhysicsGame
" X X X XX "
,
" WWWWWWW W G W WWWWW"
,
};
private
static
readonly
String
[]
pelilapi
=
{
" "
,
" "
,
" "
,
" "
,
" "
,
" "
,
" "
,
};
private
static
readonly
int
TileWidth
=
800
/
taso0
[
0
].
Length
;
private
static
readonly
int
TileHeight
=
480
/
taso0
.
Length
;
private
static
readonly
string
[][]
tasolista
=
{
taso0
,
taso1
,
taso2
};
private
static
readonly
string
[][]
tasolista
=
{
taso0
,
taso1
,
taso2
,
pelilapi
};
private
IntMeter
KeratytKolikot
;
private
IntMeter
Elamat
;
...
...
@@ -99,10 +112,9 @@ public class Kolikkogoblin : PhysicsGame
{
MultiSelectWindow
alkuvalikko
=
new
MultiSelectWindow
(
"Pelin alkuvalikko"
,
"Aloita peli"
,
"Lopeta"
);
Add
(
alkuvalikko
);
alkuvalikko
.
AddItemHandler
(
0
,
AloitaUusiPeli
);
alkuvalikko
.
AddItemHandler
(
1
,
Exit
);
AloitaUusiPeli
();
}
/// <summary>
/// Aloitetaan peli. Aluksi siivotaan kaikki, jotta voidaan aloittaa uusi peli.
...
...
@@ -110,7 +122,6 @@ public class Kolikkogoblin : PhysicsGame
/// </summary>
public
void
AloitaUusiPeli
()
{
// KeratytKolikot = 0;
tasoNr
.
Value
=
0
;
UusiTaso
();
}
...
...
@@ -120,10 +131,12 @@ public class Kolikkogoblin : PhysicsGame
public
void
UusiTaso
()
{
ClearAll
();
if
(
tasoNr
.
Value
>
tasolista
.
Length
)
if
(
tasoNr
.
Value
==
3
)
{
Console
.
WriteLine
(
"LÄPÄISIT PELIN"
);
NaytaIlmoitus
(
"Onneksi Olkoon läpäisit kaikki kartat"
,
Color
.
Yellow
);
return
;
}
ClearAll
();
int
index
=
tasoNr
.
Value
;
string
[]
tasonKuva
=
tasolista
[
index
];
Level
.
Background
.
Image
=
taustakuva
;
...
...
@@ -407,4 +420,18 @@ public class Kolikkogoblin : PhysicsGame
elamat
.
BindTo
(
Elamat
);
Add
(
elamat
);
}
/// <summary>
///
/// </summary>
/// <param name="teksti"></param>
/// <param name="vari"></param>
private
void
NaytaIlmoitus
(
string
teksti
,
Color
vari
)
{
Label
label
=
new
Label
(
teksti
);
label
.
Width
=
400
;
label
.
Height
=
200
;
label
.
Color
=
vari
;
label
.
BorderColor
=
Color
.
Black
;
Add
(
label
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment