Changeset 2412
- Timestamp:
- 2011-07-01 12:11:21 (12 years ago)
- Location:
- 2011/26/JaakkoL
- Files:
-
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Peli.cs
r2402 r2412 14 14 Player player; 15 15 Image background1 = LoadImage("Images/reactorInsideBG"); 16 17 // The sound effect intended for walking sounds close enough to ferocious aliens ripping your guts out 18 SoundEffect alienAttack = LoadSoundEffect("Sounds/walkingSound"); 16 19 17 20 public override void Begin() … … 76 79 MediaPlayer.Stop(); 77 80 // Starts playing the background music, which is set to repeat 78 MediaPlayer.Play("Sounds/Stage 1Music");81 MediaPlayer.Play("Sounds/Stage2Music"); 79 82 MediaPlayer.Volume = 0.75; 80 83 MediaPlayer.IsRepeating = true; … … 97 100 } 98 101 99 void handleAlienCollision( MeleeAlien alien, Player player)102 void handleAlienCollision(PhysicsObject alien, PhysicsObject target) 100 103 { 101 player.reduceHitPointsBy(10); 104 if (target.Tag == "Player") 105 { 106 alienAttack.Play(); 107 player.reduceHitPointsBy(10); 108 } 102 109 } 103 110 … … 124 131 { 125 132 MeleeAlien meleeAlien = new MeleeAlien(45, 80, Shape.Rectangle, 50, player); 133 AddCollisionHandler(meleeAlien, handleAlienCollision); 126 134 return meleeAlien; 127 135 } -
2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Player.cs
r2402 r2412 24 24 : base(width, height, shape, HP) 25 25 { 26 hitPoints = 100;26 hitPoints = HP; 27 27 AddedToGame += addControls; 28 28 this.Image = portrait; -
2011/26/JaakkoL/todo.txt
r2402 r2412 6 6 Kävelyääni 7 7 HP:en visuaalinen dokumentointi 8 Vihollisten hyökkäykset
Note: See TracChangeset
for help on using the changeset viewer.