Changeset 693
- Timestamp:
- 2010-06-10 14:58:20 (13 years ago)
- Location:
- 2010/23/leperoih/Tasohyppely2
- Files:
-
- 8 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
2010/23/leperoih/Tasohyppely2/Content/Content.contentproj
r620 r693 124 124 </Compile> 125 125 </ItemGroup> 126 <ItemGroup> 127 <Compile Include="jaba oikeelle.png"> 128 <Name>jaba oikeelle</Name> 129 <Importer>TextureImporter</Importer> 130 <Processor>TextureProcessor</Processor> 131 </Compile> 132 </ItemGroup> 133 <ItemGroup> 134 <Compile Include="jaba oikeelle2.png"> 135 <Name>jaba oikeelle2</Name> 136 <Importer>TextureImporter</Importer> 137 <Processor>TextureProcessor</Processor> 138 </Compile> 139 </ItemGroup> 140 <ItemGroup> 141 <Compile Include="jaba.png"> 142 <Name>jaba</Name> 143 <Importer>TextureImporter</Importer> 144 <Processor>TextureProcessor</Processor> 145 </Compile> 146 </ItemGroup> 147 <ItemGroup> 148 <Compile Include="jaba potku.png"> 149 <Name>jaba potku</Name> 150 <Importer>TextureImporter</Importer> 151 <Processor>TextureProcessor</Processor> 152 </Compile> 153 <Compile Include="jaba potku2.png"> 154 <Name>jaba potku2</Name> 155 <Importer>TextureImporter</Importer> 156 <Processor>TextureProcessor</Processor> 157 </Compile> 158 <Compile Include="jaba potku3.png"> 159 <Name>jaba potku3</Name> 160 <Importer>TextureImporter</Importer> 161 <Processor>TextureProcessor</Processor> 162 </Compile> 163 <Compile Include="jaba potku4.png"> 164 <Name>jaba potku4</Name> 165 <Importer>TextureImporter</Importer> 166 <Processor>TextureProcessor</Processor> 167 </Compile> 168 </ItemGroup> 126 169 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 127 170 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2010/23/leperoih/Tasohyppely2/Peli.cs
r659 r693 18 18 IntMeter pisteLaskuri; 19 19 ValueDisplay pisteNaytto; 20 20 Animation PotkuAnimaatio; 21 21 PlatformCharacter pelaaja1; 22 22 PhysicsObject pahikset; … … 123 123 pelaaja1 = new PlatformCharacter(40, 80); 124 124 pelaaja1.Mass = 14.0; 125 //pelaaja1.Image = LoadImage(" My char");125 //pelaaja1.Image = LoadImage("jaba"); 126 126 pelaaja1.X = 0; 127 127 pelaaja1.Y = Level.Bottom + 120; 128 128 Juokseminen(); 129 Image[] PotkuKuvat = LoadImages("jaba potku", "jaba potku2", "jaba potku3", "jaba potku4"); 130 PotkuAnimaatio = new Animation(PotkuKuvat); 131 //pelaaja1.Image = LoadImage("jaba"); 129 132 130 133 AddCollisionHandler(pelaaja1, osuiMaaliin); … … 140 143 } 141 144 145 void Potkaise(Animation potkaisu) 146 { 147 //potkaisu.FPS = 25; 148 pelaaja1.Animation = potkaisu; 149 PotkuAnimaatio.Start(1); 150 } 142 151 void Juokseminen() 143 152 { 144 Image[] tekstuurit = LoadImages(" oikealleliikkuu", "oikealleliikkuu2");153 Image[] tekstuurit = LoadImages("jaba oikeelle", "jaba oikeelle2"); 145 154 Animation KavelyTekstuuri = new Animation( tekstuurit ); 146 155 KavelyTekstuuri.FPS = 5; 147 156 pelaaja1.RightWalkingAnimation = KavelyTekstuuri; 148 157 pelaaja1.LeftWalkingAnimation = Animation.Mirror( KavelyTekstuuri ); 149 pelaaja1.RightIdleAnimation = new Animation( LoadImage( " My char" ) );150 pelaaja1.LeftIdleAnimation = new Animation( Image.Mirror( LoadImage( " My char" ) ) );158 pelaaja1.RightIdleAnimation = new Animation( LoadImage( "jaba" ) ); 159 pelaaja1.LeftIdleAnimation = new Animation( Image.Mirror( LoadImage( "jaba" ) ) ); 151 160 } 152 161 … … 161 170 void VihollinenLyo(Timer sender) 162 171 { 163 MessageDisplay.Add("vihollinenLyo");164 172 } 165 173 PhysicsObject lisaaMaali() … … 178 186 Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, "Poistu pelistä"); 179 187 188 Keyboard.Listen(Key.S, ButtonState.Down, Potkaise, "Potkaise", PotkuAnimaatio); 189 Keyboard.Listen(Key.A, ButtonState.Down, Potkaise, "Potkaise", Animation.Mirror(PotkuAnimaatio)); 180 190 Keyboard.Listen(Key.Left, ButtonState.Down, liikuta, "Liikkuu vasemmalle", pelaaja1, -nopeus); 181 191 Keyboard.Listen(Key.Left, ButtonState.Released, liikuta, "Liikkuu vasemmalle", pelaaja1, 0.0);
Note: See TracChangeset
for help on using the changeset viewer.