From 766ee24422bcd5610a463e90d1654e6e9ecffe11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A4iv=C3=B6=20Jimi=20Sebastian?= <jiminaivo@gmail.com> Date: Mon, 9 Dec 2024 15:26:40 +0200 Subject: [PATCH] kommentointia --- .../SimulaattoriPeli/SimulaattoriPeli.cs | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/SimulaattoriPeli/SimulaattoriPeli/SimulaattoriPeli.cs b/SimulaattoriPeli/SimulaattoriPeli/SimulaattoriPeli.cs index 3ce68a0..567b160 100644 --- a/SimulaattoriPeli/SimulaattoriPeli/SimulaattoriPeli.cs +++ b/SimulaattoriPeli/SimulaattoriPeli/SimulaattoriPeli.cs @@ -96,27 +96,27 @@ public class SimulaattoriPeli : PhysicsGame private void HahmoInfot() { - PushButton GiantButton = new PushButton(185, 185, ""); - GiantButton.Shape = Shape.Circle; - GiantButton.Color = Color.Transparent; - GiantButton.BorderColor = Color.Transparent; - GiantButton.Position = new Vector(-850, 300); - Add(GiantButton, 2); - - GameObject GiantInfo = new GameObject(450, 1000, Shape.Rectangle); - GiantInfo.Color = Color.MediumPurple; - GiantInfo.Position = new Vector(750, 0); - - Label GiantInfoOtsikko = new Label("GIANT"); - GiantInfoOtsikko.TextColor = Color.Black; - GiantInfoOtsikko.Position = new Vector(Ohjeet.X, Ohjeet.Top - 40); - GiantInfo.Add(GiantInfoOtsikko); - - PushButton GiantButtonClose = new PushButton(185, 185, ""); - GiantButtonClose.Shape = Shape.Circle; - GiantButtonClose.Color = Color.Transparent; - GiantButtonClose.BorderColor = Color.Transparent; - GiantButtonClose.Position = new Vector(-850, 300); + PushButton GiantButton = new PushButton(185, 185, ""); // INFONAPPI JA SEN KOKO + GiantButton.Shape = Shape.Circle; //MUOTO + GiantButton.Color = Color.Transparent; //VÄRI + GiantButton.BorderColor = Color.Transparent; //REUNOJEN VÄRIT + GiantButton.Position = new Vector(-850, 300); // SIJAINTI + Add(GiantButton, 2); // LUO NAPIN + + GameObject GiantInfo = new GameObject(450, 1000, Shape.Rectangle); // INFOALUE OBJEKTI + GiantInfo.Color = Color.MediumPurple; // VÄRI + GiantInfo.Position = new Vector(750, 0); // SIJANTI + + Label GiantInfoOtsikko = new Label("GIANT"); // INFON TEKSTI + GiantInfoOtsikko.TextColor = Color.Black; // VÄRI + GiantInfoOtsikko.Position = new Vector(Ohjeet.X, Ohjeet.Top - 40); // SIJAINTI + GiantInfo.Add(GiantInfoOtsikko); // LUO OTSIKON + + PushButton GiantButtonClose = new PushButton(185, 185, ""); // INFON SULKEMISNAPPI + GiantButtonClose.Shape = Shape.Circle; // MUOTO + GiantButtonClose.Color = Color.Transparent; // VÄRI + GiantButtonClose.BorderColor = Color.Transparent; // REUNOJEN VÄRI + GiantButtonClose.Position = new Vector(-850, 300); // SIJAINTI, KAIKKI TÄMÄN KOHDAN KOMMENTIT PÄTEE MYÖS TÄSTÄ ALEMMAS SAMANLAISIIN KOODEIHIN //-------------------------------------------------------------------- @@ -288,12 +288,12 @@ public class SimulaattoriPeli : PhysicsGame //-------------------------------------------------------------------- - GiantButton.Clicked += delegate + GiantButton.Clicked += delegate //KUN NAPPIA PAINETAAN { - Add(GiantInfo,3); - Add(GiantButtonClose, 3); - Remove(GoblinInfo); - Remove(ArcherInfo); + Add(GiantInfo,3); // LISÄÄ KYSEISEN HAHMON INFOT + Add(GiantButtonClose, 3); // LISÄÄ SULKEMIS NAPIN + Remove(GoblinInfo); // POISTAA AIJEMMAT MAHDOLLISET NAPIT + Remove(ArcherInfo); // SAMA ALEMMISSA SAMANLAISISSA KOODEISSA Remove(MageInfo); Remove(KnightInfo); Remove(HealerInfo); @@ -460,9 +460,9 @@ public class SimulaattoriPeli : PhysicsGame CloseInfo.Position = new Vector(725, 510); Add(CloseInfo); - CloseInfo.Clicked += delegate + CloseInfo.Clicked += delegate //Kun nappia painetaan { - Remove(GiantInfo); + Remove(GiantInfo); //poistaa kaikki infot ja sulkemis napit Remove(GoblinInfo); Remove(ArcherInfo); Remove(MageInfo); -- GitLab