Changeset 658 for 2010/23


Ignore:
Timestamp:
2010-06-10 11:41:56 (10 years ago)
Author:
rikaroih
Message:
 
Location:
2010/23/rikaroih/Autopeli1
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • 2010/23/rikaroih/Autopeli1/Content/Content.contentproj

    r635 r658  
    9191    </Compile> 
    9292  </ItemGroup> 
     93  <ItemGroup> 
     94    <Compile Include="taustamusiikki.wav"> 
     95      <Name>taustamusiikki</Name> 
     96      <Importer>WavImporter</Importer> 
     97      <Processor>SoundEffectProcessor</Processor> 
     98    </Compile> 
     99  </ItemGroup> 
    93100  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    94101  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
  • 2010/23/rikaroih/Autopeli1/Peli.cs

    r635 r658  
    88    public class Peli : TopDownPhysicsGame 
    99    { 
     10        SoundEffect taustamusiikki; 
     11         
    1012        Automobile auto; 
    1113        Automobile auto2; 
     
    3638            Level.BackgroundColor = Color.Black; 
    3739            Level.Background.Image = LoadImage("avaruus"); 
     40            taustamusiikki = LoadSoundEffect("taustamusiikki"); 
     41            taustamusiikki.Play(); 
     42 
    3843        } 
    3944 
     
    161166            if ( target.Equals(pallo) || target.Equals(pallo2) || target.Equals(pallo3) || target.Equals(pallo4)) 
    162167            { 
     168                Explosion rajahdys = new Explosion(200); 
     169                rajahdys.Position = auto.Position; 
     170                rajahdys.Force = 100; 
     171                Add(rajahdys); 
     172 
    163173                auto.Destroy(); 
    164174            } 
Note: See TracChangeset for help on using the changeset viewer.