Changeset 2410
- Timestamp:
- 2011-07-01 12:02:37 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2011/26/OttoS/Space Race/Space Race/Space Race/Peli.cs
r2374 r2410 23 23 ExplosionSystem rajahdys = new ExplosionSystem(LoadImage("123"), 200); 24 24 25 25 26 public override void Begin() 26 27 { … … 32 33 //LuoAikaLaskuri(); 33 34 35 IsFullScreen = true; 36 34 37 if (DataStorage.Exists("pisteet.xml")) 35 38 topLista = DataStorage.Load<ScoreList>(topLista, "pisteet.xml"); 36 37 39 38 40 } … … 49 51 Este.Velocity = new Vector(-250 - (RandomGen.NextDouble(nopeutus / 2, nopeutus)), 0.0); 50 52 51 nopeutus += 9;53 nopeutus += 7; 52 54 } 53 55 … … 59 61 Keyboard.Listen(Key.Down, ButtonState.Down, 60 62 LiikutaUFO, null, new Vector(0, -1000)); 63 Keyboard.Listen(Key.Right, ButtonState.Down, 64 LiikutaUFO, null, new Vector(1000, 0)); 65 Keyboard.Listen(Key.Left, ButtonState.Down, 66 LiikutaUFO, null, new Vector(-1000, 0)); 61 67 62 68 } … … 127 133 UFO.IgnoresCollisionResponse = true; 128 134 129 Vector impulssi = new Vector( 500.0, 0.0);135 Vector impulssi = new Vector(300.0, 0.0); 130 136 UFO.Restitution = 1.0; 131 137 Level.BackgroundColor = Color.White; 132 138 Camera.ZoomToLevel(); 133 139 Level.Background.Image = taustaKuva; 134 Level.CreateBorders( true);140 Level.CreateBorders(false); 135 141 136 142 ajastin = new Timer(); … … 139 145 ajastin.Start(); 140 146 AddCollisionHandler(UFO, KasitteleUfonTormays); 141 142 143 144 147 } 145 148 … … 149 152 Camera.ZoomFactor = 1; 150 153 Level.Background.Image = ValikonKuva; 154 Level.Background.Size = new Vector(Screen.Width, Screen.Height); 155 151 156 valikonKohdat = new List<Label>(); 152 157 153 158 Label kohta1 = new Label("Aloita uusi peli"); 154 kohta1.Position = new Vector(- 500, -100);159 kohta1.Position = new Vector(-400, -100); 155 160 valikonKohdat.Add(kohta1); 156 161 157 162 Label kohta2 = new Label("Lopeta"); 158 kohta2.Position = new Vector(- 500, -200);163 kohta2.Position = new Vector(-400, -200); 159 164 valikonKohdat.Add(kohta2); 160 165 161 166 Label kohta3 = new Label("Pistelista"); 162 kohta3.Position = new Vector(- 500, -150);167 kohta3.Position = new Vector(-400, -150); 163 168 valikonKohdat.Add(kohta3); 164 169 … … 167 172 Add(valikonKohta); 168 173 } 169 170 174 Mouse.ListenOn(kohta1, MouseButton.Left, ButtonState.Pressed, AloitaPeli, null); 171 175 Mouse.ListenOn(kohta2, MouseButton.Left, ButtonState.Pressed, Exit, null); … … 175 179 Mouse.IsCursorVisible = true; 176 180 Mouse.ListenMovement(1.0, ValikossaLiikkuminen, null); 177 178 181 } 179 182 … … 213 216 HighScoreWindow topIkkuna = new HighScoreWindow("Space Race", 214 217 "Parhaat pisteet", 215 " Etkö nyt parempaan pystynyt? %p! No, Syötä nyt nimesi:",218 "Tumpelo etkö nyt parempaan pystynyt? %p! No, Syötä nyt nimesi:", 216 219 topLista, alaspainLaskuri.Value); 217 220 topIkkuna.Closed += TallennaPisteet;
Note: See TracChangeset
for help on using the changeset viewer.