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
jimsebna
ohj1ht
Commits
3c4dfc04
Commit
3c4dfc04
authored
6 hours ago
by
Näivö Jimi Sebastian
Browse files
Options
Downloads
Patches
Plain Diff
AI LISÄTTY PARILLE
parent
1748ad8d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SimulaattoriPeli/SimulaattoriPeli/SimulaattoriPeli.cs
+16
-5
16 additions, 5 deletions
SimulaattoriPeli/SimulaattoriPeli/SimulaattoriPeli.cs
with
16 additions
and
5 deletions
SimulaattoriPeli/SimulaattoriPeli/SimulaattoriPeli.cs
+
16
−
5
View file @
3c4dfc04
...
...
@@ -264,9 +264,17 @@ public class SimulaattoriPeli : PhysicsGame
Giant
.
Image
=
giantkuva
;
//Määritellään giant fysiikkaobjektille kuva
Giant
.
Image
.
Scaling
=
ImageScaling
.
Nearest
;
//kuvan skaalausmenetelmä
Giant
.
Position
=
SatunnainenPaikka
();
Add
(
Giant
);
//Lisätään giant fysiikkaobjekti peliin
Giant
.
IgnoresGravity
=
true
;
Giant
.
Mass
=
1000
;
RandomMoverBrain
satunnaisaivotgiant
=
new
RandomMoverBrain
(
10000
);
//Luodaan oliolle tekoäly
satunnaisaivotgiant
.
ChangeMovementSeconds
=
3
;
Giant
.
Brain
=
satunnaisaivotgiant
;
Vector
nopeus
=
new
Vector
(
100
,
100
);
Giant
.
Hit
(
Giant
.
Mass
*
nopeus
);
Add
(
Giant
);
//Lisätään giant fysiikkaobjekti peliin
}
/*RandomMoverBrain satunnaisaivotgiant = new RandomMoverBrain(200); //Luodaan oliolle tekoäly
...
...
@@ -281,14 +289,17 @@ public class SimulaattoriPeli : PhysicsGame
witch
.
Image
=
witchkuva
;
//Määritellään witch fysiikkaobjektille kuva
witch
.
Image
.
Scaling
=
ImageScaling
.
Nearest
;
//kuvan skaalausmenetelmä
witch
.
Position
=
SatunnainenPaikka
();
// Määritellään satunnainen sijainti
Add
(
witch
);
//Lisätään witch fysiikkaobjekti peliin
}
/*
RandomMoverBrain
satunnaisaivotnoita
=
new
RandomMoverBrain
(
200
);
//Luodaan oliolle tekoäly
satunnaisaivotnoita
.
ChangeMovementSeconds
=
3
;
witch
.
Brain
=
satunnaisaivotnoita
;
Vector
nopeusnoita
=
new
Vector
(
100
,
100
);
witch.Hit(witch.Mass * nopeusnoita); */
witch
.
Hit
(
witch
.
Mass
*
nopeusnoita
);
Add
(
witch
);
//Lisätään witch fysiikkaobjekti peliin
}
void
FysiikkaHealer
()
{
...
...
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