Changeset 4443


Ignore:
Timestamp:
2013-07-04 15:16:53 (10 years ago)
Author:
janiemit
Message:
 
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  
    2929        menu.AddItemHandler(2, PerkMenu); 
    3030        menu.AddItemHandler(3, Exit); 
     31        MediaPlayer.Play("MenuMusic"); 
    3132        Add(menu); 
    3233 
     
    6667                } 
    6768            } 
     69            else if (commands[0] == "tenthleveltaurenchieftain") 
     70            { 
     71                MediaPlayer.Play("SpesialEasterEgg"); 
     72            } 
    6873            else if (commands[0] == "level") 
    6974            { 
     
    103108                        for (int i = 0; i < int.Parse(commands[2]); i++) 
    104109                            SpawnZombie(); 
    105                     } else { SpawnZombie(); } 
     110                    } 
     111                    else { SpawnZombie(); } 
    106112                } 
    107113            } 
     
    137143            { 
    138144                UI.GameOver(); 
     145            } 
     146            else if (commands[0] == "player") 
     147            { 
     148                if (commands[1] == "stop") 
     149                { 
     150                    MediaPlayer.Stop(); 
     151                } 
    139152            } 
    140153            else if (commands[0] == "exit") 
     
    154167        Keyboard.Listen(Key.E, ButtonState.Pressed, delegate() { Inventory(); }, null); 
    155168        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 
    156176        AddScoreMeter(); 
    157177 
     
    168188    } 
    169189 
     190    private void BackgroundMusicPlayer() 
     191    { 
     192        if (!MediaPlayer.IsPlaying) 
     193            MediaPlayer.Play("GameM" + RandomGen.NextInt(1, 5)); 
     194    } 
     195 
    170196    public void Score(int changeValue) 
    171197    { 
     
    181207        if (RandomGen.NextBool()) 
    182208        { 
    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); 
    185211        } 
    186212        else 
    187213        { 
    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); 
    190216        } 
    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); 
    192218        enemies.Add(zombie); 
    193219        Add(zombie); 
     
    231257        IsPaused = true; 
    232258    } 
    233      
     259 
    234260    public void Inventory() //ToDo Inventory and funktionality 
    235261    { 
  • 2013/27/TeemuM/Game/Game/Game/Game.csproj.Debug.cachefile

    r4378 r4443  
    44Content\Zombie3.xnb 
    55Content\Zombie4.xnb 
     6Content\DemonSpawn.xnb 
     7Content\GameM1.xnb 
     8Content\GameM2.xnb 
     9Content\GameM3.xnb 
     10Content\GameM4.xnb 
     11Content\GameMTroll1.xnb 
     12Content\GameOver.xnb 
     13Content\MenuMusic.xnb 
     14Content\RandomsoundH.xnb 
     15Content\SpesialEasterEgg.xnb 
     16Content\ZombieBite.xnb 
     17Content\ZombieCreate.xnb 
     18Content\Zombiesoud1.xnb 
     19Content\Zombiesoud2.xnb 
     20Content\DemonSpawn.wma 
     21Content\GameM1.wma 
     22Content\GameM2.wma 
     23Content\GameM3.wma 
     24Content\GameM4.wma 
     25Content\GameMTroll1.wma 
     26Content\GameOver.wma 
     27Content\MenuMusic.wma 
     28Content\RandomsoundH.wma 
     29Content\SpesialEasterEgg.wma 
     30Content\ZombieBite.wma 
     31Content\ZombieCreate.wma 
     32Content\Zombiesoud1.wma 
     33Content\Zombiesoud2.wma 
  • 2013/27/TeemuM/Game/Game/GameContent/GameContent.contentproj

    r4392 r4443  
    7474    </Compile> 
    7575  </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> 
    76148  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    77149  <!--  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.