Changeset 7976


Ignore:
Timestamp:
2016-07-07 16:09:08 (3 years ago)
Author:
sieerinn
Message:

Kyykkykuvat peliin asti

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

Legend:

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

    r7920 r7976  
    7979            var advenA = MakePlayer(position, width, height, 1, new List<Key> { Key.Up, Key.Down, Key.Left, Key.Right, Key.Enter }); 
    8080            advenA.Color = Color.HotPink; 
    81             advenA.Animation = new Animation(advenaImages); 
    82             advenA.Animation.Start(); 
     81            advenA.AnimWalk = new Animation(advenaImages); 
     82            advenA.AnimWalk.Start(); 
     83            advenA.AnimCrouch = new Animation(advenaCrouch); 
     84            advenA.AnimCrouch.Start(); 
    8385            advenae.Add(advenA); 
    8486            return advenA; 
     
    9193            var advenB = MakePlayer(position, width, height, 2, new List<Key> { Key.W, Key.S, Key.A, Key.D, Key.E }); 
    9294            advenB.Color = Color.Harlequin; 
    93             advenB.Animation = new Animation(advenbImages); 
    94             advenB.Animation.Start(); 
     95            advenB.AnimWalk = new Animation(advenbImages); 
     96            advenB.AnimWalk.Start(); 
     97            advenB.AnimCrouch = new Animation(advenbCrouch); 
     98            advenB.AnimCrouch.Start(); 
    9599            advenae.Add(advenB); 
    96100            return advenB; 
  • 2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragore/Player.cs

    r7975 r7976  
    1010    class Player : SimplePlatformCharacter 
    1111    { 
     12        public Animation AnimWalk { get; set; } 
     13        public Animation AnimCrouch { get; set; } 
     14 
    1215        public bool IsCrouching { get; private set; } 
    1316 
     
    6467        { 
    6568            var dt = time.SinceLastUpdate.TotalSeconds; 
     69 
     70            // Animaatiosäätö. 
     71            Animation = IsCrouching ? AnimCrouch : AnimWalk; 
    6672 
    6773            // Pelaajan kiihdytys. 
  • 2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragore/VenienteFragore.cs

    r7975 r7976  
    1919        private readonly Image[] advenaImages = LoadImages("advenawalk\\advenawalk00", 1, 49, true); 
    2020        private readonly Image[] advenbImages = LoadImages("advenbwalk\\advenb00", 1, 49, true); 
     21 
     22        private readonly Image advenaCrouch = LoadImage("advenacrouch"); 
     23        private readonly Image advenbCrouch = LoadImage("advenbcrouch"); 
    2124 
    2225        private List<Player> advenae; 
  • 2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragoreContent/VenienteFragoreContent.contentproj

    r7920 r7976  
    602602    </Compile> 
    603603  </ItemGroup> 
     604  <ItemGroup> 
     605    <Compile Include="advenacrouch.png"> 
     606      <Name>advenacrouch</Name> 
     607      <Importer>TextureImporter</Importer> 
     608      <Processor>TextureProcessor</Processor> 
     609    </Compile> 
     610    <Compile Include="advenbcrouch.png"> 
     611      <Name>advenbcrouch</Name> 
     612      <Importer>TextureImporter</Importer> 
     613      <Processor>TextureProcessor</Processor> 
     614    </Compile> 
     615  </ItemGroup> 
    604616  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    605617  <!--  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.