- Timestamp:
- 2013-07-05 12:29:41 (10 years ago)
- Location:
- 2013/27/TeemuM
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
2013/27/TeemuM/Game/Game/Game/AudioPlayer.cs
r4448 r4484 46 46 tick.Start(); 47 47 Player(types[i], max[i]); 48 return true; 49 } 50 51 return false; 52 } 53 54 public bool PlayEffect(String type) 55 { 56 for (int i = 0; i < types.Count; i++) 57 if (types[i].ToLower() == type.ToLower()) 58 { 59 Game.LoadSoundEffect(type + RandomGen.NextInt(0, max[i])).Play(); 48 60 return true; 49 61 } -
2013/27/TeemuM/Game/Game/Game/Game.cs
r4468 r4484 16 16 audio.RegisterType("Background", 4); 17 17 audio.RegisterType("Enemyspawn", 0); 18 audio.RegisterType("GameOver ", 0);18 audio.RegisterType("GameOverSound", 0); 19 19 audio.RegisterType("MenuMusic", 0); 20 20 audio.RegisterType("RandomSound", 0); … … 260 260 { 261 261 ClearAll(); 262 MessageDisplay.Add("Saved!");263 262 MainMenu(); 264 263 } … … 322 321 private void GameOver() 323 322 { 323 ClearControls(); 324 audio.Play("GameOverSound", true); 324 325 GameObject layer = new GameObject(Game.Screen.Width + 100, Game.Screen.Height + 100); 325 326 layer.Color = Color.Transparent; … … 328 329 layer.FadeColorTo(Color.Lerp(Color.Transparent, Color.Black, 0.8), 1.0); 329 330 330 Label t = new Label("Game over"); 331 t.Position = player.Position; 332 t.TextColor = Color.White; 333 Add(t, 1); 331 GameObject txt = new GameObject(987, 248); 332 txt.Position = player.Position; 333 txt.Image = LoadImage("GameOverImage"); 334 Add(txt, 1); 335 336 PushButton r = new PushButton("Play again"); 337 r.X = player.X; 338 r.Y = player.Y - Screen.Height / 4; 339 r.Clicked += delegate() { ClearAll(); MainMenu(); }; 340 Add(r, 1); 334 341 335 342 Timer.SingleShot(1, delegate { IsPaused = true; }); -
2013/27/TeemuM/Game/Game/Game/Game.csproj.Debug.cachefile
r4476 r4484 10 10 Content\Background4.xnb 11 11 Content\Enemyspawn0.xnb 12 Content\GameOver0.xnb13 12 Content\MenuMusic0.xnb 14 13 Content\Randomsound0.xnb … … 19 18 Content\transparent.xnb 20 19 Content\EasterEgg.xnb 20 Content\transparent.xnb 21 Content\GameOverSound0.xnb 22 Content\GameOverImage.xnb 21 23 Content\Background0.wma 22 24 Content\Background1.wma … … 25 27 Content\Background4.wma 26 28 Content\Enemyspawn0.wma 27 Content\GameOver0.wma28 29 Content\MenuMusic0.wma 29 30 Content\Randomsound0.wma … … 33 34 Content\Zombiesound2.wma 34 35 Content\EasterEgg.wma 36 Content\GameOverSound0.wma -
2013/27/TeemuM/Game/Game/Game/Player.cs
r4476 r4484 72 72 Explosion explosion = new Explosion(50); 73 73 explosion.Position = pos; 74 explosion.Force = 0; 74 75 game.Add(explosion); 75 76 } … … 79 80 if (target is Enemy) 80 81 { 81 Explosion(target.Position);82 82 if (weapon is Cannon) 83 83 ((Enemy)target).Health(-cannonDamage); … … 88 88 else if (weapon is AssaultRifle) 89 89 ((Enemy)target).Health(-AssaultRifleDamage); 90 Explosion(target.Position); 90 91 } 91 92 projectile.Destroy(); -
2013/27/TeemuM/Game/Game/GameContent/GameContent.contentproj
r4468 r4484 106 106 </Compile> 107 107 <Compile Include="GameOver0.mp3"> 108 <Name>GameOver 0</Name>108 <Name>GameOverSound0</Name> 109 109 <Importer>Mp3Importer</Importer> 110 110 <Processor>SongProcessor</Processor> … … 153 153 </Compile> 154 154 </ItemGroup> 155 <ItemGroup> 156 <Compile Include="GameOver.png"> 157 <Name>GameOverImage</Name> 158 <Importer>TextureImporter</Importer> 159 <Processor>TextureProcessor</Processor> 160 </Compile> 161 </ItemGroup> 155 162 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 156 163 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Note: See TracChangeset
for help on using the changeset viewer.