- Timestamp:
- 2015-07-03 09:42:45 (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
r6764 r6770 46 46 SoundEffect osuma = LoadSoundEffect("osuma"); 47 47 SoundEffect tausta = LoadSoundEffect("pelimusiikkibyJimi"); 48 SoundEffect hyppy = LoadSoundEffect("hyppyaani"); 48 49 49 50 IntMeter pelaajan1Elamat; … … 134 135 //MediaPlayer.IsRepeating = true; 135 136 136 for (int i = 0; i < 100; i++)137 {138 tausta.Play();139 }137 //for (int i = 0; i < 100; i++) 138 //{ 139 // tausta.Play(); 140 //} 140 141 141 142 Level.Background.CreateGradient(Color.LightGreen, Color.SkyBlue); … … 259 260 pelaaja1.Weapon.FireRate = 0.5; 260 261 261 pelaaja1.Weapon.IsVisible = true;262 pelaaja1.Weapon.IsVisible = false; 262 263 263 264 pelaaja1.Weapon.ProjectileCollision = AmmusOsuivihuun; … … 391 392 ControllerOne.Listen(Button.A, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 392 393 ControllerOne.Listen(Button.RightTrigger, ButtonState.Down, AmmuAseella, "Ammu", pelaaja1); 394 ControllerOne.Listen(Button.RightShoulder, ButtonState.Down, Juokse, "pelaaja juoksee oikealle", pelaaja1); 395 ControllerOne.Listen(Button.LeftShoulder, ButtonState.Down, JuokseVasen, "Pelaaja juoksee vasemmalle", pelaaja1); 393 396 394 397 PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); … … 407 410 } 408 411 412 void Juokse(PlatformCharacter hahmo) 413 { 414 hahmo.Walk(400); 415 } 416 417 void JuokseVasen(PlatformCharacter hahmo) 418 { 419 hahmo.Walk(-400); 420 } 421 409 422 void Hyppaa(PlatformCharacter hahmo, double nopeus) 410 423 { 411 424 hahmo.Jump(nopeus); 425 hyppy.Play(); 412 426 } 413 427 … … 452 466 453 467 454 if (pelaajan1Tahdet == 5 1)468 if (pelaajan1Tahdet == 50) 455 469 { 456 470 MessageDisplay.Add("Voitit pelin!");
Note: See TracChangeset
for help on using the changeset viewer.