diff --git a/SimulaattoriPeli/SimulaattoriPeli/SimulaattoriPeli.cs b/SimulaattoriPeli/SimulaattoriPeli/SimulaattoriPeli.cs index 22108e740c85ed2e5bced93f1c791a403976ddde..cb9d67fda37bf1e8960eca5741a6c6ea3717e729 100644 --- a/SimulaattoriPeli/SimulaattoriPeli/SimulaattoriPeli.cs +++ b/SimulaattoriPeli/SimulaattoriPeli/SimulaattoriPeli.cs @@ -23,7 +23,7 @@ public class SimulaattoriPeli : PhysicsGame private GameObject Areena; //luo areenan alueen private GameObject Hahmot; //luo hahmojen valinta alueen private GameObject Ohjeet; //luo ohjeet - private GameObject HahmotPaikka; + public override void Begin() { @@ -55,10 +55,16 @@ public class SimulaattoriPeli : PhysicsGame Hahmot.Position = new Vector(-750, 0); //Hahmojen alueen sijainti Add(Hahmot); //lisää hahmojen alueen - HahmotPaikka = new GameObject(150, 150, Shape.Circle); //Luo hahmojen paikat - HahmotPaikka.Color = Color.White; //Hahmojen paikka väri - HahmotPaikka.Position = new Vector(-750, 300); - Add(HahmotPaikka); + for (int jakso = 0; jakso < 2; jakso++) + { + for (int rivi = 0; rivi < 4; rivi++) + { + GameObject HahmotPaikka = new GameObject(150, 150, Shape.Circle); //Luo hahmojen paikat + HahmotPaikka.Color = Color.White; //Hahmojen paikka väri + HahmotPaikka.Position = new Vector(-850 + jakso * 200, 300 - rivi * 220); + Add(HahmotPaikka); + } + } Label hahmotOtsikko = new Label("Characters"); //teksti hahmojen alueelle hahmotOtsikko.TextColor = Color.Black; // tekstin väri