Skip to content
Snippets Groups Projects
Commit 85bbf7f2 authored by Mäkinen Maria Isabella's avatar Mäkinen Maria Isabella
Browse files

kissa ai KESKEN / TESTI

parent d27e034c
No related branches found
No related tags found
No related merge requests found
......@@ -60,6 +60,23 @@ public class SimulaattoriPeli : PhysicsGame
HahmotPaikka.Position = new Vector(-750, 300);
Add(HahmotPaikka);
PhysicsObject kissa = new PhysicsObject(20.0, 20.0);
kissa.Shape = Shape.Circle;
kissa.Color = Color.Red;
Add(kissa);
//Tehdään uudet satunnaisaivot, jotka liikkuvat nopeudella 200
RandomMoverBrain satunnaisaivot = new RandomMoverBrain(200);
//Ominaisuuksien muokkaaminen
satunnaisaivot.ChangeMovementSeconds = 3;
//Aivot käyttöön oliolle
kissa.Brain = satunnaisaivot;
Vector nopeus = new Vector(100, 100);
kissa.Hit(kissa.Mass * nopeus);
Label hahmotOtsikko = new Label("Characters"); //teksti hahmojen alueelle
hahmotOtsikko.TextColor = Color.Black; // tekstin väri
hahmotOtsikko.Position = new Vector(Hahmot.X, Hahmot.Top - 40); // tekstin sijainti
......
git 0 → 100644
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment