Changeset 7999


Ignore:
Timestamp:
2016-07-07 21:13:09 (3 years ago)
Author:
jotapoti
Message:

Ääniefektejä lisätty (hyppyääniä 3kpl ja vahingon ottamisen ääni)

Location:
2016/27/ohjaajat/VenienteFragore/VenienteFragore
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • 2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragore/LevelCreationMethods.cs

    r7997 r7999  
    9696            advenA.AnimCrouch = new Animation(advenaCrouch); 
    9797            advenA.AnimCrouch.Start(); 
     98            advenA.JumpSounds = LoadSoundEffects("jump1", "jump2", "jump3"); 
     99            advenA.GettingHitSounds = LoadSoundEffects("ouch1"); 
    98100            advenae.Add(advenA); 
    99101            respawnPoint = position; 
     
    111113            advenB.AnimCrouch = new Animation(advenbCrouch); 
    112114            advenB.AnimCrouch.Start(); 
     115            advenB.JumpSounds = LoadSoundEffects("jump1", "jump2", "jump3"); 
     116            advenB.GettingHitSounds = LoadSoundEffects("ouch1"); 
    113117            advenae.Add(advenB); 
    114118            return advenB; 
  • 2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragore/Player.cs

    r7993 r7999  
    1212        public Animation AnimWalk { get; set; } 
    1313        public Animation AnimCrouch { get; set; } 
     14 
     15        public SoundEffect[] JumpSounds { get; set; } 
     16        public SoundEffect[] GettingHitSounds { get; set; } 
    1417 
    1518        public bool IsCrouching { get; private set; } 
     
    5861        public void Die() 
    5962        { 
     63            if (GettingHitSounds != null) 
     64            { 
     65                GettingHitSounds[RandomGen.NextInt(GettingHitSounds.Length)].Play(); 
     66            } 
    6067            IsAlive = false; 
    6168            Died?.Invoke(); 
     
    7683 
    7784            if (IsGrounded) 
     85            { 
    7886                jumpForce = 400; 
     87                if (JumpSounds != null) JumpSounds[RandomGen.NextInt(JumpSounds.Length)].Play(); 
     88            } 
    7989        } 
    8090 
  • 2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragore/VenienteFragore.cs

    r7998 r7999  
    326326 
    327327            Player advenNew = new Player(adven.Width, adven.Height); 
     328 
     329             
     330 
    328331            switch (adven.PlayerNumber) 
    329332            { 
     
    336339            } 
    337340 
     341             
    338342            advenNew.Position = adven.Position + new Vector(adven.Width, 0); 
    339343 
  • 2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragoreContent/VenienteFragoreContent.contentproj

    r7989 r7999  
    666666    </Compile> 
    667667  </ItemGroup> 
     668  <ItemGroup> 
     669    <Compile Include="jump1.wav"> 
     670      <Name>jump1</Name> 
     671      <Importer>WavImporter</Importer> 
     672      <Processor>SoundEffectProcessor</Processor> 
     673    </Compile> 
     674  </ItemGroup> 
     675  <ItemGroup> 
     676    <Compile Include="jump2.wav"> 
     677      <Name>jump2</Name> 
     678      <Importer>WavImporter</Importer> 
     679      <Processor>SoundEffectProcessor</Processor> 
     680    </Compile> 
     681    <Compile Include="jump3.wav"> 
     682      <Name>jump3</Name> 
     683      <Importer>WavImporter</Importer> 
     684      <Processor>SoundEffectProcessor</Processor> 
     685    </Compile> 
     686  </ItemGroup> 
     687  <ItemGroup> 
     688    <Compile Include="ouch1.wav"> 
     689      <Name>ouch1</Name> 
     690      <Importer>WavImporter</Importer> 
     691      <Processor>SoundEffectProcessor</Processor> 
     692    </Compile> 
     693  </ItemGroup> 
    668694  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    669695  <!--  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.