- Timestamp:
- 2012-06-08 13:40:31 (11 years ago)
- Location:
- 2012/23/HannesM/The Game of Rooms/The Game of Rooms
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/23/HannesM/The Game of Rooms/The Game of Rooms/The Game of Rooms/The_Game_of_Rooms.cs
r2876 r2889 13 13 bool onTikkaat = false; 14 14 IntMeter AmmusLaskuri; 15 15 int kenttaNro = 1; 16 16 17 public override void Begin() 17 18 { 18 luoKentta(); 19 20 PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 21 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 22 23 } 24 void luoKentta() 25 { 26 27 TileMap ruudut = TileMap.FromLevelAsset("The Game Of Rooms (map1)"); 19 MultiSelectWindow valikko = new MultiSelectWindow("Valikko", "Taso 1", "Taso 2"); 20 valikko.ItemSelected += Valinappi; 21 Add(valikko); 22 } 23 24 void luoKentta(String kentannimi) 25 { 26 27 TileMap ruudut = TileMap.FromLevelAsset(kentannimi); 28 28 29 29 Elama(); … … 109 109 Hyppaa, null, 100.0); 110 110 Keyboard.Listen(Key.LeftShift, ButtonState.Pressed, Ammu, null); 111 Keyboard.Listen(Key.O, ButtonState.Pressed, Begin, null); 111 112 112 113 } … … 114 115 void luoseina(Vector paikka, double leveys, double korkeus) 115 116 { 116 PhysicsObject seina = PhysicsObject.CreateStaticObject( 20, korkeus);117 PhysicsObject seina = PhysicsObject.CreateStaticObject(leveys, korkeus); 117 118 seina.Position = paikka; 118 119 seina.Shape = Shape.Rectangle; … … 124 125 void luoseina2(Vector paikka, double leveys, double korkeus) 125 126 { 126 PhysicsObject seina2 = PhysicsObject.CreateStaticObject(leveys, 47.5);127 PhysicsObject seina2 = PhysicsObject.CreateStaticObject(leveys, korkeus); 127 128 seina2.Position = paikka; 128 129 seina2.Shape = Shape.Rectangle; … … 490 491 } 491 492 493 void SeuraavaKentta(int kentanNro) 494 { 495 ClearAll(); 496 497 Laskuri(); 498 499 Camera.Follow(pelaaja); 500 Camera.ZoomFactor = (1.5); 501 502 Level.BackgroundColor = Color.White; 503 504 Surface vasenReuna = Surface.CreateLeft(Level, 30, 30, 10); 505 vasenReuna.Color = Color.Black; 506 Add(vasenReuna); 507 Surface oikeaReuna = Surface.CreateRight(Level, 30, 30, 10); 508 oikeaReuna.Color = Color.Black; 509 Add(oikeaReuna); 510 Surface yläReuna = Surface.CreateTop(Level, 30, 30, 10); 511 yläReuna.Color = Color.Black; 512 Add(yläReuna); 513 Surface alaReuna = Surface.CreateBottom(Level, 30, 30, 10); 514 alaReuna.Color = Color.Black; 515 Add(alaReuna); 516 517 Gravity = new Vector(0, -800); 518 519 if (kentanNro == 1) luoKentta("The Game Of Rooms (map1)"); 520 else if (kentanNro == 2) luoKentta("The Game Of Rooms (map2)"); 521 else if (kentanNro > 3) Exit(); 522 523 PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 524 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 525 526 } 527 528 void Valinappi(int valinta) 529 { 530 SeuraavaKentta(valinta + 1); 531 } 492 532 } 493 533 -
2012/23/HannesM/The Game of Rooms/The Game of Rooms/The Game of RoomsContent/The Game of RoomsContent.contentproj
r2857 r2889 234 234 </Compile> 235 235 </ItemGroup> 236 <ItemGroup> 237 <Compile Include="The Game Of Rooms %28map2%29.txt"> 238 <Name>The Game Of Rooms %28map2%29</Name> 239 <Importer>TextFileImporter</Importer> 240 <Processor>TextFileContentProcessor</Processor> 241 </Compile> 242 </ItemGroup> 236 243 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 237 244 <!-- 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.