Changeset 4443
- Timestamp:
- 2013-07-04 15:16:53 (10 years ago)
- Location:
- 2013/27/TeemuM
- Files:
-
- 13 added
- 11 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
2013/27/TeemuM/Game/Game/Game/Game.cs
r4429 r4443 29 29 menu.AddItemHandler(2, PerkMenu); 30 30 menu.AddItemHandler(3, Exit); 31 MediaPlayer.Play("MenuMusic"); 31 32 Add(menu); 32 33 … … 66 67 } 67 68 } 69 else if (commands[0] == "tenthleveltaurenchieftain") 70 { 71 MediaPlayer.Play("SpesialEasterEgg"); 72 } 68 73 else if (commands[0] == "level") 69 74 { … … 103 108 for (int i = 0; i < int.Parse(commands[2]); i++) 104 109 SpawnZombie(); 105 } else { SpawnZombie(); } 110 } 111 else { SpawnZombie(); } 106 112 } 107 113 } … … 137 143 { 138 144 UI.GameOver(); 145 } 146 else if (commands[0] == "player") 147 { 148 if (commands[1] == "stop") 149 { 150 MediaPlayer.Stop(); 151 } 139 152 } 140 153 else if (commands[0] == "exit") … … 154 167 Keyboard.Listen(Key.E, ButtonState.Pressed, delegate() { Inventory(); }, null); 155 168 Keyboard.Listen(Key.Tab, ButtonState.Pressed, DeveloperCommand, null); 169 170 MediaPlayer.Stop(); 171 Timer mPlayer = new Timer(); 172 mPlayer.Interval = 3; 173 mPlayer.Timeout += BackgroundMusicPlayer; 174 mPlayer.Start(); 175 156 176 AddScoreMeter(); 157 177 … … 168 188 } 169 189 190 private void BackgroundMusicPlayer() 191 { 192 if (!MediaPlayer.IsPlaying) 193 MediaPlayer.Play("GameM" + RandomGen.NextInt(1, 5)); 194 } 195 170 196 public void Score(int changeValue) 171 197 { … … 181 207 if (RandomGen.NextBool()) 182 208 { 183 x = RandomGen.SelectOne(Screen.Left -i, Screen.Right+i);184 y = RandomGen.NextDouble(Screen.Bottom -i, Screen.Top+i);209 x = RandomGen.SelectOne(Screen.Left - i, Screen.Right + i); 210 y = RandomGen.NextDouble(Screen.Bottom - i, Screen.Top + i); 185 211 } 186 212 else 187 213 { 188 x = RandomGen.NextDouble(Screen.Left -i, Screen.Right+i);189 y = RandomGen.SelectOne(Screen.Bottom -i, Screen.Top+i);214 x = RandomGen.NextDouble(Screen.Left - i, Screen.Right + i); 215 y = RandomGen.SelectOne(Screen.Bottom - i, Screen.Top + i); 190 216 } 191 Zombie zombie = new Zombie(50, 50, x +player.X, y+player.Y, 100);217 Zombie zombie = new Zombie(50, 50, x + player.X, y + player.Y, 100); 192 218 enemies.Add(zombie); 193 219 Add(zombie); … … 231 257 IsPaused = true; 232 258 } 233 259 234 260 public void Inventory() //ToDo Inventory and funktionality 235 261 { -
2013/27/TeemuM/Game/Game/Game/Game.csproj.Debug.cachefile
r4378 r4443 4 4 Content\Zombie3.xnb 5 5 Content\Zombie4.xnb 6 Content\DemonSpawn.xnb 7 Content\GameM1.xnb 8 Content\GameM2.xnb 9 Content\GameM3.xnb 10 Content\GameM4.xnb 11 Content\GameMTroll1.xnb 12 Content\GameOver.xnb 13 Content\MenuMusic.xnb 14 Content\RandomsoundH.xnb 15 Content\SpesialEasterEgg.xnb 16 Content\ZombieBite.xnb 17 Content\ZombieCreate.xnb 18 Content\Zombiesoud1.xnb 19 Content\Zombiesoud2.xnb 20 Content\DemonSpawn.wma 21 Content\GameM1.wma 22 Content\GameM2.wma 23 Content\GameM3.wma 24 Content\GameM4.wma 25 Content\GameMTroll1.wma 26 Content\GameOver.wma 27 Content\MenuMusic.wma 28 Content\RandomsoundH.wma 29 Content\SpesialEasterEgg.wma 30 Content\ZombieBite.wma 31 Content\ZombieCreate.wma 32 Content\Zombiesoud1.wma 33 Content\Zombiesoud2.wma -
2013/27/TeemuM/Game/Game/GameContent/GameContent.contentproj
r4392 r4443 74 74 </Compile> 75 75 </ItemGroup> 76 <ItemGroup> 77 <Compile Include="DemonSpawn.mp3"> 78 <Name>DemonSpawn</Name> 79 <Importer>Mp3Importer</Importer> 80 <Processor>SongProcessor</Processor> 81 </Compile> 82 <Compile Include="GameM1.mp3"> 83 <Name>GameM1</Name> 84 <Importer>Mp3Importer</Importer> 85 <Processor>SongProcessor</Processor> 86 </Compile> 87 <Compile Include="GameM2.mp3"> 88 <Name>GameM2</Name> 89 <Importer>Mp3Importer</Importer> 90 <Processor>SongProcessor</Processor> 91 </Compile> 92 <Compile Include="GameM3.mp3"> 93 <Name>GameM3</Name> 94 <Importer>Mp3Importer</Importer> 95 <Processor>SongProcessor</Processor> 96 </Compile> 97 <Compile Include="GameM4.mp3"> 98 <Name>GameM4</Name> 99 <Importer>Mp3Importer</Importer> 100 <Processor>SongProcessor</Processor> 101 </Compile> 102 <Compile Include="GameMTroll1.mp3"> 103 <Name>GameMTroll1</Name> 104 <Importer>Mp3Importer</Importer> 105 <Processor>SongProcessor</Processor> 106 </Compile> 107 <Compile Include="GameOver.mp3"> 108 <Name>GameOver</Name> 109 <Importer>Mp3Importer</Importer> 110 <Processor>SongProcessor</Processor> 111 </Compile> 112 <Compile Include="MenuMusic.mp3"> 113 <Name>MenuMusic</Name> 114 <Importer>Mp3Importer</Importer> 115 <Processor>SongProcessor</Processor> 116 </Compile> 117 <Compile Include="RandomsoundH.mp3"> 118 <Name>RandomsoundH</Name> 119 <Importer>Mp3Importer</Importer> 120 <Processor>SongProcessor</Processor> 121 </Compile> 122 <Compile Include="SpesialEasterEgg.mp3"> 123 <Name>SpesialEasterEgg</Name> 124 <Importer>Mp3Importer</Importer> 125 <Processor>SongProcessor</Processor> 126 </Compile> 127 <Compile Include="ZombieBite.mp3"> 128 <Name>ZombieBite</Name> 129 <Importer>Mp3Importer</Importer> 130 <Processor>SongProcessor</Processor> 131 </Compile> 132 <Compile Include="ZombieCreate.mp3"> 133 <Name>ZombieCreate</Name> 134 <Importer>Mp3Importer</Importer> 135 <Processor>SongProcessor</Processor> 136 </Compile> 137 <Compile Include="Zombiesoud1.mp3"> 138 <Name>Zombiesoud1</Name> 139 <Importer>Mp3Importer</Importer> 140 <Processor>SongProcessor</Processor> 141 </Compile> 142 <Compile Include="Zombiesoud2.mp3"> 143 <Name>Zombiesoud2</Name> 144 <Importer>Mp3Importer</Importer> 145 <Processor>SongProcessor</Processor> 146 </Compile> 147 </ItemGroup> 76 148 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 77 149 <!-- 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.