Changeset 6427 for 2015


Ignore:
Timestamp:
2015-06-26 08:56:05 (8 years ago)
Author:
jotapoti
Message:

Kentälle 1 oma musiikki

Location:
2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • 2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun.cs

    r6423 r6427  
    395395        ClearAll(); 
    396396        CreateLevel(); 
     397         
     398        PlayLevelMusic(); 
    397399        ScreenSettings(); 
    398400        SetControls(); 
     
    402404    { 
    403405        levelNumber++; 
     406        PlayLevelMusic(); 
    404407        StartGame(); 
     408    } 
     409 
     410    private void PlayLevelMusic() 
     411    { 
     412        MediaPlayer.Stop(); 
     413        if (levelNumber == 0) 
     414        { 
     415            MediaPlayer.Play("hillbilly_level0");        
     416        } 
     417        else if (levelNumber == 1) 
     418        { 
     419            MediaPlayer.Play("hillbilly_level1"); 
     420        } 
     421        else 
     422        { 
     423            MediaPlayer.Play("hillbilly_intro"); // other levels have this music 
     424        } 
     425        MediaPlayer.IsRepeating = true; 
    405426    } 
    406427 
  • 2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRunContent/HillbillyRunContent.contentproj

    r6423 r6427  
    491491    </Compile> 
    492492  </ItemGroup> 
     493  <ItemGroup> 
     494    <Compile Include="hillbilly_level1.mp3"> 
     495      <Name>hillbilly_level1</Name> 
     496      <Importer>Mp3Importer</Importer> 
     497      <Processor>SongProcessor</Processor> 
     498    </Compile> 
     499  </ItemGroup> 
    493500  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    494501  <!--  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.