- Timestamp:
- 2013-06-28 10:16:17 (10 years ago)
- Location:
- 2013/26/MikkoTi/Tasohyppelypeli3
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
2013/26/MikkoTi/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3.cs
r4261 r4293 17 17 int kenttaNro = 1; 18 18 19 Image pelaajanKuva = LoadImage("Hahmo ");19 Image pelaajanKuva = LoadImage("Hahmo2"); 20 20 Image tahtiKuva = LoadImage("AmmoBox"); 21 21 Image maaliKuva = LoadImage("MaalinKuva"); 22 22 Image esteenKuva = LoadImage("Este"); 23 Image PinkBoxKuva = LoadImage("PinkBox"); 24 23 25 24 26 public override void Begin() … … 26 28 { 27 29 SeuraavaKentta(); 28 Camera.Zoom(0. 8);30 Camera.Zoom(0.5); 29 31 } 30 32 … … 55 57 kentta.SetTileMethod('N', LisaaPelaaja); 56 58 kentta.SetTileMethod('M', LisaaMaali); 59 kentta.SetTileMethod('P', LisaaPinkBox); 57 60 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 58 61 Level.CreateBorders(false); … … 84 87 } 85 88 89 void LisaaPinkBox(Vector paikka, double leveys, double korkeus) 90 { 91 PhysicsObject pinkbox = PhysicsObject.CreateStaticObject(leveys, korkeus); 92 pinkbox.IgnoresCollisionResponse = true; 93 pinkbox.Position = paikka; 94 pinkbox.Image = PinkBoxKuva; 95 pinkbox.Tag = "PinkBox"; 96 Add(pinkbox); 97 } 98 86 99 void LisaaTahti(Vector paikka, double leveys, double korkeus) 87 100 { … … 98 111 pelaaja1 = new PlatformCharacter(leveys, korkeus); 99 112 pelaaja1.Position = paikka; 100 pelaaja1.Mass = 4.0;113 pelaaja1.Mass = 3.9; 101 114 pelaaja1.Image = pelaajanKuva; 102 115 AddCollisionHandler(pelaaja1, "AmmoBox", TormaaTahteen); -
2013/26/MikkoTi/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3Content/Kentta6.txt
r4261 r4293 21 21 ####*****################## ## 22 22 #*************************# ## 23 #************************* ###23 #*************************P ## 24 24 #*************************#M## 25 25 ############################## -
2013/26/MikkoTi/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3Content/Tasohyppelypeli3Content.contentproj
r4261 r4293 53 53 <Compile Include="norsu.png"> 54 54 <Name>norsu</Name> 55 <Importer>TextureImporter</Importer> 56 <Processor>TextureProcessor</Processor> 57 </Compile> 58 <Compile Include="PinkBox.png"> 59 <Name>PinkBox</Name> 55 60 <Importer>TextureImporter</Importer> 56 61 <Processor>TextureProcessor</Processor> … … 130 135 </Compile> 131 136 </ItemGroup> 137 <ItemGroup> 138 <Compile Include="Hahmo2.png"> 139 <Name>Hahmo2</Name> 140 <Importer>TextureImporter</Importer> 141 <Processor>TextureProcessor</Processor> 142 </Compile> 143 </ItemGroup> 132 144 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 133 145 <!-- 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.