Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
escape
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
annhenle
escape
Commits
291e7105
Commit
291e7105
authored
5 days ago
by
Lehtinen Anni Henriikka
Browse files
Options
Downloads
Patches
Plain Diff
Kiekon lisääminen kentälle satunnaiseen paikkaan lisätty
parent
c536573a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Escape/Escape/Content/Barkov.png
+0
-0
0 additions, 0 deletions
Escape/Escape/Content/Barkov.png
Escape/Escape/Escape.cs
+16
-2
16 additions, 2 deletions
Escape/Escape/Escape.cs
Escape/Escape/Escape.csproj
+6
-0
6 additions, 0 deletions
Escape/Escape/Escape.csproj
with
22 additions
and
2 deletions
Escape/Escape/Content/Barkov.png
+
0
−
0
View replaced file @
c536573a
View file @
291e7105
564 B
|
W:
|
H:
1.13 KiB
|
W:
|
H:
2-up
Swipe
Onion skin
This diff is collapsed.
Click to expand it.
Escape/Escape/Escape.cs
+
16
−
2
View file @
291e7105
...
...
@@ -8,7 +8,7 @@ using Jypeli.Widgets;
namespace
Escape
;
/// @author annilehtinen
/// @version 28.03.2025
/// @version 28.03.2025
/ 2
/// <summary>
/// Peli, jossa pelaajaan tavoitteena on vältellä vastustajaa (Barkov) ja kerätä kiekkoja saadakseen pisteitä.
/// </summary>
...
...
@@ -32,7 +32,11 @@ public class Escape : PhysicsGame
barkov
.
Image
=
LoadImage
(
"Barkov.png"
);
barkov
.
X
=
60
;
barkov
.
Y
=
-
60
;
this
.
Add
(
barkov
);
this
.
Add
(
barkov
);
SpawnPuck
();
Timer
.
CreateAndStart
(
4.0
,
SpawnPuck
);
/// <summary>
/// Peliohjainten asettaminen
/// </summary>
...
...
@@ -64,5 +68,15 @@ public class Escape : PhysicsGame
{
player
.
Angle
+=
Angle
.
FromDegrees
(
angle
);
}
void
SpawnPuck
()
{
GameObject
puck
=
new
GameObject
(
18
,
18
);
puck
.
Shape
=
Shape
.
Circle
;
puck
.
Color
=
Color
.
Black
;
puck
.
LifetimeLeft
=
TimeSpan
.
FromSeconds
(
5.0
);
puck
.
Position
=
Level
.
GetRandomPosition
();
this
.
Add
(
puck
);
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Escape/Escape/Escape.csproj
+
6
−
0
View file @
291e7105
...
...
@@ -35,6 +35,12 @@
<None Update="Content\player_move1 kopio.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Content\puck.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Content\puck3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
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