Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Ajope
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
nikaleko
Ajope
Commits
1ceb5a1c
Commit
1ceb5a1c
authored
1 year ago
by
Koskinen Niko Aleksi
Browse files
Options
Downloads
Patches
Plain Diff
Vielä toisen kerran
parent
f6173736
Branches
tyo8.2
Branches containing commit
Tags
vaihe8.2
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
suunnitelma/Harjotustyo/Harjotustyo/Harjotustyo.cs
+5
-10
5 additions, 10 deletions
suunnitelma/Harjotustyo/Harjotustyo/Harjotustyo.cs
with
5 additions
and
10 deletions
suunnitelma/Harjotustyo/Harjotustyo/Harjotustyo.cs
+
5
−
10
View file @
1ceb5a1c
...
...
@@ -9,8 +9,6 @@ namespace Harjotustyo;
/// <summary>
/// Luodaan Vihollinen luokka, jolla on mm. terveys
/// </summary>
public
class
Vihollinen
:
PhysicsObject
{
private
IntMeter
vihollisenTerveys
=
new
IntMeter
(
2
,
0
,
2
);
...
...
@@ -18,7 +16,6 @@ public class Vihollinen : PhysicsObject
/// <summary>
/// Yhdistää vihollisen terveyden Terveyslaskuriin
/// </summary>
public
IntMeter
TerveysLaskuri
{
get
{
return
vihollisenTerveys
;
}
...
...
@@ -35,7 +32,6 @@ public class Vihollinen : PhysicsObject
{
vihollisenTerveys
.
LowerLimit
+=
delegate
{
this
.
Destroy
();
};
}
}
...
...
@@ -47,11 +43,10 @@ public class Auto : PhysicsObject
{
private
IntMeter
PelaajanTerveys
=
new
IntMeter
(
4
,
0
,
4
);
/// <summary>
/// Yhdistää pelaajan terveyden Terveyslaskuriin
/// </summary>
public
IntMeter
TerveysLaskuri
{
get
{
return
PelaajanTerveys
;
}
...
...
@@ -63,7 +58,6 @@ public class Auto : PhysicsObject
/// </summary>
/// <param name="leveys">leveys</param>
/// <param name="korkeus">korkeus</param>
public
Auto
(
double
leveys
,
double
korkeus
)
:
base
(
leveys
,
korkeus
)
{
PelaajanTerveys
.
LowerLimit
+=
delegate
{
this
.
Destroy
();
};
...
...
@@ -73,7 +67,7 @@ public class Auto : PhysicsObject
/// <summary>
///
///
Luo pelin, jossa ajetaan autolla kolikoita keräillen ja vihollisia paeten
/// </summary>
public
class
Harjotustyo
:
PhysicsGame
{
...
...
@@ -198,7 +192,7 @@ public class Harjotustyo : PhysicsGame
/// <summary>
///
///
Kääntää autoa haluttuun suuntaan
/// </summary>
/// <param name="Auto">Olio, jota komennot koskevat</param>
/// <param name="voima">Millä voimalla käännytään</param>
...
...
@@ -299,8 +293,9 @@ public class Harjotustyo : PhysicsGame
/// <summary>
///
Tason luovat aliohjelmat
///
Aliohjelma luo tason
/// </summary>
/// <param name="tasonNimi">Taso, joka halutaan luoda</param>
public
void
LuoTaso
(
string
tasonNimi
)
{
TileMap
ruudut
=
TileMap
.
FromLevelAsset
(
tasonNimi
);
...
...
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