- Timestamp:
- 2012-06-15 12:19:15 (11 years ago)
- Location:
- 2012/24/TatuS
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/24/TatuS/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Stickman Fight.cs
r3075 r3118 77 77 void aloitapeli() 78 78 { 79 new NotImplementedException(); 80 luoKentta(); 81 lisaaNappaimet(); 79 SeuraavaKentta(kenttaNro); 82 80 Gravity = new Vector(0, -1000); 83 81 Camera.Follow(pelaaja1); … … 89 87 lisaaMaali(); 90 88 LuoLaskuri(); 91 LuoKentta2(); 92 LuoKentta3(); 89 93 90 } 94 91 … … 98 95 ClearAll(); 99 96 Gravity = new Vector(0, -1000); 100 if (kentanNro == 1) luoKentta(); 101 else if (kentanNro == 2) LuoKentta2(); 102 else if (kentanNro == 3) LuoKentta3(); 103 104 105 } 106 107 108 109 110 void LuoKentta2() 97 if (kentanNro == 1) luoKentta("kentta1.txt"); 98 else if (kentanNro == 2) LuoKentta2("kentta2.txt"); 99 else if (kentanNro == 3) LuoKentta3("kentta3.txt"); 100 lisaaNappaimet(); 101 Gravity = new Vector(0, -1000); 102 Camera.Follow(pelaaja1); 103 Camera.ZoomFactor = 2; 104 105 Camera.StayInLevel = true; 106 107 } 108 109 110 111 112 void LuoKentta2(string kenttaTiedostonNimi) 111 113 { 112 114 TileMap kentta = TileMap.FromLevelAsset("kentta2"); … … 115 117 kentta.SetTileMethod('N', lisaaPelaaja); 116 118 kentta.SetTileMethod('P', lisaapelaaja2); 119 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 117 120 Level.CreateBorders(); 118 121 Level.BackgroundColor = Color.Brown; 119 } 120 121 void LuoKentta3() 122 Gravity = new Vector(0, -1000); 123 } 124 125 void LuoKentta3(string kenttaTiedostonNimi) 122 126 { 123 127 TileMap kentta = TileMap.FromLevelAsset("kentta3"); … … 126 130 kentta.SetTileMethod('N', lisaaPelaaja); 127 131 kentta.SetTileMethod('P', lisaapelaaja2); 132 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 128 133 Level.CreateBorders(); 129 134 Level.BackgroundColor = Color.Brown; 135 Gravity = new Vector(0, -1000); 136 130 137 } 131 138 132 139 133 void luoKentta( )140 void luoKentta(string kenttaTiedostonNimi) 134 141 { 135 142 TileMap kentta = TileMap.FromLevelAsset("kentta1"); … … 187 194 pelaaja2.Destroyed += delegate 188 195 { 189 pisteLaskuri.Value += 1 ;196 pisteLaskuri.Value += 10; 190 197 }; 191 198 … … 273 280 { 274 281 275 276 277 if (kohde == pelaaja1) 282 if (kohde.Tag.ToString()== "pelaaja") 278 283 { 279 284 kenttaNro++; -
2012/24/TatuS/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.csproj
r3024 r3118 62 62 </PropertyGroup> 63 63 <ItemGroup> 64 <Reference Include="Jypeli4"> 64 <Reference Include="Jypeli, Version=5.0.0.0, Culture=neutral, processorArchitecture=x86"> 65 <SpecificVersion>False</SpecificVersion> 66 <HintPath>..\..\..\Jypeli.dll</HintPath> 65 67 </Reference> 66 68 <Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86"> -
2012/24/TatuS/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1Content/kentta1.txt
r3075 r3118 12 12 ######### PPPP # 13 13 # ################ 14 PPPP# #14 PPP # # 15 15 # PPP # 16 16 ### ###################################### # 17 17 P P # 18 19 ################################################# #########20 21 P P P P PP#22 ######################################################### ######18 P PPPP P # 19 ################################################# 20 # 21 PP P P P P PP PPPP *# 22 #########################################################
Note: See TracChangeset
for help on using the changeset viewer.