- Timestamp:
- 2013-06-27 14:18:32 (10 years ago)
- Location:
- 2013/26/MikkoTi/Tasohyppelypeli3
- Files:
-
- 6 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
2013/26/MikkoTi/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3.cs
r4236 r4261 23 23 24 24 public override void Begin() 25 25 26 { 26 SeuraavaKentta(); 27 SeuraavaKentta(); 28 Camera.Zoom(0.8); 27 29 } 28 30 … … 36 38 else if (kenttaNro == 2) LuoKentta("Kentta2"); 37 39 else if (kenttaNro == 3) LuoKentta("Kentta3"); 38 else if (kenttaNro > 3) Exit(); 40 else if (kenttaNro == 4) LuoKentta("Kentta4"); 41 else if (kenttaNro == 5) LuoKentta("Kentta5"); 42 else if (kenttaNro == 6) LuoKentta("Kentta6"); 43 else if (kenttaNro > 6) Exit(); 39 44 45 LuoAikaLaskuri(); 40 46 LisaaNappaimet(); 41 47 … … 49 55 kentta.SetTileMethod('N', LisaaPelaaja); 50 56 kentta.SetTileMethod('M', LisaaMaali); 51 kentta.SetTileMethod('E', LisaaEste);52 57 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 53 Level.CreateBorders( );58 Level.CreateBorders(false); 54 59 Level.Background.CreateGradient(Color.Black, Color.Purple); 55 60 } … … 71 76 maali.Tag = "maali"; 72 77 Add(maali); 73 }74 75 void LisaaEste(Vector paikka, double leveys, double korkeus)76 {77 PhysicsObject este = PhysicsObject.CreateStaticObject(leveys, korkeus);78 este.IgnoresCollisionResponse = true;79 este.Position = paikka;80 este.Image = esteenKuva;81 este.Tag = "Este";82 Add(este);83 78 } 84 79 … … 129 124 } 130 125 126 void LuoAikaLaskuri() 127 { 128 Timer aikaLaskuri = new Timer(); 129 aikaLaskuri.Start(); 130 131 Label aikaNaytto = new Label(); 132 aikaNaytto.TextColor = Color.White; 133 aikaNaytto.DecimalPlaces = 1; 134 aikaNaytto.BindTo(aikaLaskuri.SecondCounter); 135 Add(aikaNaytto); 136 } 137 131 138 void Liikuta(PlatformCharacter hahmo, double nopeus) 132 139 { -
2013/26/MikkoTi/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3Content/Tasohyppelypeli3Content.contentproj
r4236 r4261 46 46 </ItemGroup> 47 47 <ItemGroup> 48 <Compile Include="Kentta5.txt"> 49 <Name>Kentta5</Name> 50 <Importer>TextFileImporter</Importer> 51 <Processor>TextFileContentProcessor</Processor> 52 </Compile> 48 53 <Compile Include="norsu.png"> 49 54 <Name>norsu</Name> … … 111 116 </Compile> 112 117 </ItemGroup> 118 <ItemGroup> 119 <Compile Include="Kentta4.txt"> 120 <Name>Kentta4</Name> 121 <Importer>TextFileImporter</Importer> 122 <Processor>TextFileContentProcessor</Processor> 123 </Compile> 124 </ItemGroup> 125 <ItemGroup> 126 <Compile Include="Kentta6.txt"> 127 <Name>Kentta6</Name> 128 <Importer>TextFileImporter</Importer> 129 <Processor>TextFileContentProcessor</Processor> 130 </Compile> 131 </ItemGroup> 113 132 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 114 133 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2013/26/MikkoTi/Tasohyppelypeli3/Tasohyppelypeli3/Tasohyppelypeli3Content/kentta1.txt
r4236 r4261 14 14 ## ## ## ## ## 15 15 16 N 16 N E 17 17 ######################
Note: See TracChangeset
for help on using the changeset viewer.