Changeset 3680
- Timestamp:
- 2012-07-06 13:05:10 (11 years ago)
- Location:
- 2012/27/Alex/Sami Salaman SUURI seikkailu/Sami Salaman SUURI seikkailu
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/27/Alex/Sami Salaman SUURI seikkailu/Sami Salaman SUURI seikkailu/Sami Salaman SUURI seikkailu/Sami_Salaman_SUURI_seikkailu.cs
r3607 r3680 10 10 { 11 11 const double nopeus = 200; 12 const double hyppyNopeus = 1 000;12 const double hyppyNopeus = 1500; 13 13 const int RUUDUN_KOKO = 20; 14 14 … … 16 16 17 17 Image pelaajanKuva = LoadImage("Sh´cami"); 18 Image tahtiKuva = LoadImage(" tahti");18 Image tahtiKuva = LoadImage("§@¤W"); 19 19 20 20 SoundEffect maaliAani = LoadSoundEffect("maali"); … … 38 38 ColorTileMap kentta = ColorTileMap.FromLevelAsset("peli kenttä 1"); 39 39 kentta.SetTileMethod(Color.Brown, LisaaTaso); 40 //kentta.SetTileMethod('*', LisaaTahti);40 kentta.SetTileMethod(Color.DarkBlue, LisaaVihu); 41 41 kentta.SetTileMethod(Color.Black, LisaaPelaaja); 42 42 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 43 43 44 Level.CreateBorders(); 45 44 46 Level.Background.CreateGradient(Color.White, Color.SkyBlue); 45 47 } … … 49 51 PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 50 52 taso.Position = paikka; 51 taso.Color = Color. Green;53 taso.Color = Color.Brown; 52 54 Add(taso); 53 55 } 54 56 55 void Lisaa Tahti(Vector paikka, double leveys, double korkeus)57 void LisaaVihu(Vector paikka, double leveys, double korkeus) 56 58 { 57 PhysicsObject tahti = PhysicsObject.CreateStaticObject(leveys, korkeus);58 tahti.Ignores CollisionResponse= true;59 PhysicsObject tahti = new PhysicsObject(leveys, korkeus); 60 tahti.IgnoresGravity = true; 59 61 tahti.Position = paikka; 60 62 tahti.Image = tahtiKuva; … … 69 71 pelaaja1.Mass = 4.0; 70 72 pelaaja1.Image = pelaajanKuva; 71 AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 73 pelaaja1.RightWalkingAnimation = new Animation(Image.Mirror (pelaajanKuva)); 74 pelaaja1.LeftWalkingAnimation = new Animation(pelaajanKuva); 75 //AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 72 76 Add(pelaaja1); 73 77 } -
2012/27/Alex/Sami Salaman SUURI seikkailu/Sami Salaman SUURI seikkailu/Sami Salaman SUURI seikkailuContent/Sami Salaman SUURI seikkailuContent.contentproj
r3607 r3680 80 80 </Compile> 81 81 </ItemGroup> 82 <ItemGroup> 83 <Compile Include="§%40¤W.png"> 84 <Name>§%40¤W</Name> 85 <Importer>TextureImporter</Importer> 86 <Processor>TextureProcessor</Processor> 87 </Compile> 88 </ItemGroup> 89 <ItemGroup> 90 <Compile Include="D%40RK §%40D¤W.png"> 91 <Name>D%40RK §%40D¤W</Name> 92 <Importer>TextureImporter</Importer> 93 <Processor>TextureProcessor</Processor> 94 </Compile> 95 </ItemGroup> 82 96 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 83 97 <!-- 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.