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
5117afea
Commit
5117afea
authored
1 year ago
by
Yli-Tainio Janne Sakri Juhani
Browse files
Options
Downloads
Patches
Plain Diff
korjaus pelin läpäisemiseen
parent
ea697233
No related branches found
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
+1
-1
1 addition, 1 deletion
kolikkogoblin/.idea/.idea.kolikkogoblin/.idea/workspace.xml
kolikkogoblin/kolikkogoblin/kolikkogoblin.cs
+17
-15
17 additions, 15 deletions
kolikkogoblin/kolikkogoblin/kolikkogoblin.cs
with
18 additions
and
16 deletions
kolikkogoblin/.idea/.idea.kolikkogoblin/.idea/workspace.xml
+
1
−
1
View file @
5117afea
...
...
@@ -90,7 +90,7 @@
<workItem
from=
"1697975844304"
duration=
"9893000"
/>
<workItem
from=
"1698002748003"
duration=
"5266000"
/>
<workItem
from=
"1698053833135"
duration=
"8530000"
/>
<workItem
from=
"1698075901222"
duration=
"
108
3000"
/>
<workItem
from=
"1698075901222"
duration=
"
269
3000"
/>
</task>
<servers
/>
</component>
...
...
This diff is collapsed.
Click to expand it.
kolikkogoblin/kolikkogoblin/kolikkogoblin.cs
+
17
−
15
View file @
5117afea
...
...
@@ -33,8 +33,8 @@ public class Kolikkogoblin : PhysicsGame
" wwww g "
,
};
private
static
readonly
int
t
ileWidth
=
800
/
lines
[
0
].
Length
;
private
static
readonly
int
t
ileHeight
=
480
/
lines
.
Length
;
private
static
readonly
int
T
ileWidth
=
800
/
lines
[
0
].
Length
;
private
static
readonly
int
T
ileHeight
=
480
/
lines
.
Length
;
public
override
void
Begin
()
{
...
...
@@ -52,7 +52,7 @@ public class Kolikkogoblin : PhysicsGame
tiles
.
SetTileMethod
(
'm'
,
LuoMaali
,
Color
.
Blue
);
tiles
.
SetTileMethod
(
'p'
,
LuoPistelaskuri
,
Color
.
Blue
);
tiles
.
Execute
(
t
ileWidth
,
t
ileHeight
);
tiles
.
Execute
(
T
ileWidth
,
T
ileHeight
);
Level
.
CreateBorders
();
Camera
.
ZoomToLevel
();
...
...
@@ -64,7 +64,7 @@ public class Kolikkogoblin : PhysicsGame
private
void
LuoPalikka
(
Vector
paikka
,
double
leveys
,
double
korkeus
,
Color
vari
)
{
PhysicsObject
palikka
=
new
PhysicsObject
(
leveys
,
korkeus
/
2
);
PhysicsObject
palikka
=
new
PhysicsObject
(
leveys
*
0.95
,
korkeus
/
2
);
palikka
.
Position
=
paikka
;
palikka
.
Color
=
vari
;
palikka
.
Tag
=
"rakenne"
;
...
...
@@ -87,7 +87,7 @@ public class Kolikkogoblin : PhysicsGame
private
void
LuoGoblin
(
Vector
paikka
,
double
leveys
,
double
korkeus
,
Color
vari
)
{
PlatformCharacter
goblin
=
new
PlatformCharacter
(
leveys
*
1.5
,
korkeus
*
1.5
);
PlatformCharacter
goblin
=
new
PlatformCharacter
(
leveys
,
korkeus
*
1.5
);
goblin
.
Position
=
paikka
;
goblin
.
Color
=
vari
;
goblin
.
Image
=
LoadImage
(
"goblin1"
);
...
...
@@ -143,9 +143,11 @@ public class Kolikkogoblin : PhysicsGame
{
if
(
kohde
.
Tag
.
ToString
()
==
"Maali"
)
{
KeratytKolikot
.
MaxValue
=
6
;
MessageDisplay
.
Add
(
"Voitit Pelin"
);
goblin
.
Destroy
();
if
(
KeratytKolikot
.
Value
==
KeratytKolikot
.
MaxValue
)
{
MessageDisplay
.
Add
(
"Voitit pelin"
);
Remove
(
goblin
);
}
}
}
...
...
@@ -164,15 +166,15 @@ public class Kolikkogoblin : PhysicsGame
private
void
LuoMaali
(
Vector
paikka
,
double
leveys
,
double
korkeus
,
Color
vari
)
{
PhysicsObject
P
ortaali
=
new
PhysicsObject
(
leveys
,
korkeus
/
3
);
P
ortaali
.
Position
=
paikka
;
P
ortaali
.
Color
=
vari
;
P
ortaali
.
Tag
=
"Maali"
;
P
ortaali
.
Image
=
LoadImage
(
"Portaali"
);
Add
(
P
ortaali
);
PhysicsObject
p
ortaali
=
new
PhysicsObject
(
leveys
,
korkeus
/
3
);
p
ortaali
.
Position
=
paikka
;
p
ortaali
.
Color
=
vari
;
p
ortaali
.
Tag
=
"Maali"
;
p
ortaali
.
Image
=
LoadImage
(
"Portaali"
);
Add
(
p
ortaali
);
}
IntMeter
KeratytKolikot
;
private
IntMeter
KeratytKolikot
;
private
void
LuoPistelaskuri
(
Vector
paikka
,
double
leveys
,
double
korkeus
,
Color
vari
)
{
...
...
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