- Timestamp:
- 2015-07-02 11:40:49 (8 years ago)
- Location:
- 2015/27/JimiS/tasohyppely/hyppely
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/27/JimiS/tasohyppely/hyppely/hyppely/hyppely/hyppely.cs
r6727 r6736 27 27 28 28 EasyHighScore toplista = new EasyHighScore(); 29 30 AssaultRifle pelaajan1Ase; 29 31 30 32 … … 230 232 Add(pelaaja1); 231 233 234 pelaaja1.Weapon = new AssaultRifle(30, 10); 235 236 pelaaja1.Weapon.Ammo.Value = 100; 237 238 pelaaja1.Weapon.ProjectileCollision = AmmusOsui; 239 240 //pelaajan1Ase = new AssaultRifle(30, 10); 241 242 //pelaajan1Ase.Ammo.Value = 100; 243 244 //pelaajan1Ase.ProjectileCollision = AmmusOsui; 245 246 //pelaaja1.Add(pelaajan1Ase); 247 232 248 pelaajan1Tahdet = new IntMeter(0); 233 249 pelaajan1Tahdet.MaxValue = 100; … … 260 276 } 261 277 278 void AmmuAseella(PlatformCharacter pelaaja) 279 { 280 PhysicsObject ammus = pelaaja.Weapon.Shoot(); 281 282 if (ammus != null) 283 { 284 285 } 286 } 287 288 void AmmusOsui(PhysicsObject ammus, PhysicsObject kohde) 289 { 290 ammus.Destroy(); 291 } 292 262 293 void TormaaVihuun(PhysicsObject pelaaja, PhysicsObject vihu) 263 294 { … … 313 344 Keyboard.Listen(Key.Right, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, nopeus); 314 345 Keyboard.Listen(Key.Up, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 346 Keyboard.Listen(Key.Space, ButtonState.Down, AmmuAseella, "Ammu", pelaajan1Ase); 315 347 316 348 ControllerOne.Listen(Button.Back, ButtonState.Pressed, Exit, "Poistu pelistä"); … … 320 352 ControllerOne.Listen(Button.DPadRight, ButtonState.Down, Liikuta, "Pelaaja liikkuu oikealle", pelaaja1, nopeus); 321 353 ControllerOne.Listen(Button.A, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 354 ControllerOne.Listen(Button.RightTrigger, ButtonState.Down, AmmuAseella, "Ammu", pelaajan1Ase); 322 355 323 356 PhoneBackButton.Listen(ConfirmExit, "Lopeta peli");
Note: See TracChangeset
for help on using the changeset viewer.