- Timestamp:
- 2013-06-27 14:01:26 (10 years ago)
- Location:
- 2013/26/AkseliT/Jump Game/Jump Game
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
2013/26/AkseliT/Jump Game/Jump Game/Jump Game/Jump_Game.cs
r4259 r4260 9 9 public class Jump_Game : PhysicsGame 10 10 { 11 int kenttaNro = 6;11 int kenttaNro = 1; 12 12 PhysicsObject piikki = new PhysicsObject(20, 20); 13 13 Image pomminkuva = LoadImage("pommi"); 14 14 15 ExplosionSystem rajahdys = new ExplosionSystem(LoadImage("efecti"), 200); 15 16 Image piikinkuva = LoadImage("piikki"); 16 17 Image tahdenkuva = LoadImage("tahti"); … … 43 44 else if (kenttaNro > 6) Exit(); 44 45 LuoOhjaimet(); 46 LuoRajahdys(); 45 47 } 46 48 … … 80 82 AddCollisionHandler(pelaaja, "tahti", CollisionHandler.DestroyTarget); 81 83 AddCollisionHandler(pelaaja, "tahti", CollisionHandler.AddMeterValue(tahtiLaskuri, -1)); 84 AddCollisionHandler(pelaaja, "tahti", CollisionHandler.AddEffectOnObject(rajahdys, 100)); 82 85 Add(pelaaja); 83 86 AddCollisionHandler(pelaaja, "piikki", CollisionHandler.ExplodeObject(100, true)); 84 87 AddCollisionHandler(pelaaja, "piikki", delegate(PhysicsObject p, PhysicsObject o) 85 88 { 86 ClearAll(); 87 Begin(); 89 Timer.SingleShot(1.0, 90 91 delegate { ClearAll(); Begin(); } 92 ); 93 88 94 }); 89 95 AddCollisionHandler(pelaaja, "pommi", delegate(PhysicsObject olio, PhysicsObject pommi) 90 96 { 91 Explosion rajahdys = new Explosion(100);92 rajahdys .Position = pommi.Position;93 Add(rajahdys );97 Explosion rajahdys2 = new Explosion(100); 98 rajahdys2.Position = pommi.Position; 99 Add(rajahdys2); 94 100 pommi.Destroy(); 95 101 }); … … 167 173 } 168 174 175 void LuoRajahdys() 176 { 177 //rajahdys = new ExplosionSystem(LoadImage("efecti"), 200); 178 Add(rajahdys); 179 } 169 180 } 170 181 -
2013/26/AkseliT/Jump Game/Jump Game/Jump GameContent/Jump GameContent.contentproj
r4259 r4260 129 129 </Compile> 130 130 </ItemGroup> 131 <ItemGroup> 132 <Compile Include="efecti.png"> 133 <Name>efecti</Name> 134 <Importer>TextureImporter</Importer> 135 <Processor>TextureProcessor</Processor> 136 </Compile> 137 </ItemGroup> 131 138 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 132 139 <!-- 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.