Changeset 2404 for 2011/26/JoelH/THPeli/THPeli/Peli.cs
- Timestamp:
- 2011-07-01 11:44:52 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2011/26/JoelH/THPeli/THPeli/Peli.cs
r2381 r2404 9 9 public class Peli : PhysicsGame 10 10 { 11 IntMeter pisteLaskuri; 11 12 int pMaxMaara = 200; 12 13 ExplosionSystem rajahdys = new ExplosionSystem(LoadImage("explosio"), 500); … … 15 16 const double nopeus = 300; 16 17 const double hyppyNopeus = 1000; 17 const int RUUDUN_KOKO = 4 0;18 const int RUUDUN_KOKO = 41; 18 19 PlatformCharacter pelaaja1; 19 20 … … 45 46 luoKentta(); 46 47 lisaaNappaimet(); 48 LuoLaskuri(); 49 LuopisteLaskuri(); 50 47 51 48 52 Camera.Follow(pelaaja1); … … 56 60 ClearAll(); 57 61 valikonKohdat = new List<Label>(); 62 63 Level.BackgroundColor = Color.Black; 58 64 Level.Background.Image = splashscreen; 59 65 Level.BackgroundColor = Color.Black; … … 94 100 } 95 101 } 102 void LuopisteLaskuri() 103 { 104 pisteLaskuri = new IntMeter(0); 105 106 Label pisteNaytto = new Label(); 107 pisteNaytto.BindTo(pisteLaskuri); 108 pisteNaytto.X = Screen.Left + 50; 109 Add(pisteNaytto); 110 } 111 112 void LuoLaskuri() 113 { 114 Label pisteNaytto = new Label(); 115 pisteNaytto.X = Screen.Left + 150; 116 pisteNaytto.TextColor = Color.Red; 117 118 Add(pisteNaytto); 119 120 Label pisteTeksti = new Label("pistettä"); 121 pisteTeksti.X = Screen.Left +130; 122 pisteTeksti.TextColor = Color.Red; 123 Add(pisteTeksti); 124 } 125 96 126 97 127 void luoKentta() … … 162 192 { 163 193 Add(rajahdys); 164 //double X = 0; 165 //double Y = 0; 166 int pMaara = 600; 167 rajahdys.MaxScale = 6; 194 int pMaara = 500000; 195 rajahdys.MaxScale = 3; 168 196 rajahdys.MinScale = 1; 169 197 rajahdys.MinLifetime = 0.1; 170 198 rajahdys.MaxLifetime = 0.5; 171 199 rajahdys.AddEffect( kohde.Position, pMaara ); 200 pisteLaskuri.Value++; 201 172 202 173 203 kohde.Destroy(); 174 MessageDisplay.Add("Keräsit kristallin!!");175 MessageDisplay.TextColor = Color.White;176 204 } 177 205 }
Note: See TracChangeset
for help on using the changeset viewer.