Changeset 5642
- Timestamp:
- 2014-07-24 14:59:55 (9 years ago)
- Location:
- 2014/30/LauriR/tesohyppelytestaus
- Files:
-
- 2 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus/obj/x86/Debug/ContentPipeline-{D6EAC6A9-8675-4ACB-8A67-C6CE954765FB}.xml
r5624 r5642 36 36 <Options>None</Options> 37 37 <Output>C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\kentta1.xnb</Output> 38 <Time>2014-07-24T1 1:20:02.9261419+03:00</Time>38 <Time>2014-07-24T14:53:43.0376121+03:00</Time> 39 39 </Item> 40 40 <Item> … … 162 162 <Options>None</Options> 163 163 <Output>C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\piikit2.xnb</Output> 164 <Time>2014-07-24T10:25:44.6853504+03:00</Time> 164 <Time>2014-07-24T13:35:21.4745028+03:00</Time> 165 </Item> 166 <Item> 167 <Source>exit.png</Source> 168 <Name>exit</Name> 169 <Importer>TextureImporter</Importer> 170 <Processor>TextureProcessor</Processor> 171 <Options>None</Options> 172 <Output>C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\exit.xnb</Output> 173 <Time>2014-07-24T12:39:52.9636807+03:00</Time> 165 174 </Item> 166 175 <BuildSuccessful>true</BuildSuccessful> -
2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus/obj/x86/Debug/cachefile-{D6EAC6A9-8675-4ACB-8A67-C6CE954765FB}-targetpath.txt
r5624 r5642 17 17 Content\spikes.xnb 18 18 Content\piikit2.xnb 19 Content\exit.xnb -
2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus/obj/x86/Debug/tesohyppelytestaus.csproj.FileListAbsolute.txt
r5624 r5642 25 25 C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\spikes.xnb 26 26 C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\piikit2.xnb 27 C:\MyTemp\LauriR\tesohyppelytestaus\tesohyppelytestaus\tesohyppelytestaus\bin\x86\Debug\Content\exit.xnb -
2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus.cs
r5624 r5642 23 23 Image taustaKuva = LoadImage("doge"); 24 24 Image Piikit2 = LoadImage("piikit2"); 25 Image poistu = LoadImage("exit"); 25 26 26 27 Image[] juoksukuvat = LoadImages("kuva7", "kuva6", "kuva5", "kuva4", "kuva3", "kuva2", "kuva1"); … … 31 32 SoundEffect maaliAani = LoadSoundEffect("maali"); 32 33 33 34 Vector viimeisinCheckpoint; 35 36 IntMeter pisteLaskuri; 34 37 35 38 … … 42 45 LuoKentta(); 43 46 LisaaNappaimet(); 47 LuoPistelaskuri(); 44 48 45 49 Camera.Follow(pelaaja1); … … 57 61 kentta.SetTileMethod('K', LisaaKissa); 58 62 kentta.SetTileMethod('P', LisaaPiikit); 59 kentta.SetTileMethod('V',LisaaPiikit2); 63 kentta.SetTileMethod('E', LisaaExit); 64 kentta.SetTileMethod('M', LisaaCheckpoint); 60 65 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 61 66 Level.CreateBorders(); … … 84 89 void LisaaPelaaja(Vector paikka, double leveys, double korkeus) 85 90 { 91 viimeisinCheckpoint = paikka; 86 92 pelaaja1 = new PlatformCharacter(leveys, korkeus); 87 93 pelaaja1.Position = paikka; … … 92 98 AddCollisionHandler(pelaaja1, "kissa", TormaaKissaan); 93 99 AddCollisionHandler(pelaaja1, "spikes", TormaaPiikkeihin); 100 AddCollisionHandler(pelaaja1, "exit", TormaaExit); 101 AddCollisionHandler(pelaaja1, "Checkpoint", TormaaCheckpoint); 94 102 Add(pelaaja1); 95 103 pelaaja1.AnimWalk = new Animation(juoksukuvat); … … 164 172 Add(kissa); 165 173 166 167 168 169 174 } 170 175 … … 173 178 maaliAani.Play(); 174 179 MessageDisplay.Add("oisuit kissaan hävisit pelin"); 175 hahmo.Destroy(); 180 //hahmo.Destroy(); 181 hahmo.Position = viimeisinCheckpoint; 176 182 } 177 183 … … 179 185 void LisaaPiikit(Vector paikka, double leveys, double korkeus) 180 186 { 181 PhysicsObject spikes = PhysicsObject.CreateStaticObject(leveys * 1.0, korkeus * 1.0); 187 PhysicsObject spikes = PhysicsObject.CreateStaticObject(leveys * 1.0, korkeus -5.0); 188 spikes.Y -= 2.5; 182 189 spikes.IgnoresCollisionResponse = true; 183 190 spikes.Position = paikka; … … 190 197 { 191 198 maaliAani.Play(); 192 MessageDisplay.Add("Kuolit LÖL"); 193 hahmo.Destroy(); 194 } 195 196 void LisaaPiikit2(Vector paikka, double leveys, double korkeus) 197 { 198 PhysicsObject piikit2 = PhysicsObject.CreateStaticObject(leveys * 1.0, korkeus * 1.0); 199 piikit2.IgnoresCollisionResponse = true; 200 piikit2.Position = paikka; 201 piikit2.Image = Piikit2; 202 piikit2.Tag = "piikit2"; 203 Add(piikit2); 204 } 205 206 IntMeter pisteLaskuri; 199 MessageDisplay.Add("EN VOI HYVIN!!!"); 200 //hahmo.Destroy(); 201 hahmo.Position = viimeisinCheckpoint; 202 } 203 204 void LisaaExit(Vector paikka, double leveys, double korkeus) 205 { 206 PhysicsObject exit = PhysicsObject.CreateStaticObject(leveys * 2.5, korkeus * 2.5); 207 exit.IgnoresCollisionResponse = true; 208 exit.Position = paikka; 209 exit.Image = poistu; 210 exit.Tag = "exit"; 211 Add(exit); 212 } 213 void TormaaExit(PhysicsObject hahmo, PhysicsObject exit) 214 { 215 maaliAani.Play(); 216 MessageDisplay.Add("voitto"); 217 } 218 219 void LisaaCheckpoint(Vector paikka, double leveys, double korkeus) 220 { 221 PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 222 taso.IgnoresCollisionResponse = true; 223 taso.Position = paikka; 224 taso.Color = Color.Azure; 225 taso.Tag = "Checkpoint"; 226 Add(taso); 227 } 228 229 void TormaaCheckpoint(PhysicsObject hahmo, PhysicsObject Checkpoint) 230 { 231 viimeisinCheckpoint = Checkpoint.Position; 232 } 233 234 207 235 208 236 void LuoPistelaskuri() … … 213 241 pisteNaytto.X = Screen.Left + 100; 214 242 pisteNaytto.Y = Screen.Top - 100; 215 pisteNaytto.TextColor = Color.Black; 216 pisteNaytto.Color = Color.White; 243 pisteNaytto.TextColor = Color.Red; 244 pisteNaytto.Color = Color.Black; 245 pisteNaytto.Title = "Pisteet"; 217 246 218 247 pisteNaytto.BindTo(pisteLaskuri); … … 221 250 222 251 252 253 254 255 223 256 } -
2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestaus.csproj.Debug.cachefile
r5624 r5642 17 17 Content\spikes.xnb 18 18 Content\piikit2.xnb 19 Content\exit.xnb -
2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestausContent/kentta1.txt
r5624 r5642 1 1 2 2 3 4 5 6 7 ## ## ## ## ## ## ## 8 9 N K 10 ## ## ## ## ## ## ## ## 3 4 S 5 # 6 ## * * * K * 7 ## ## ## ## ## ## ## 11 8 12 13 P # PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 14 # ######################################### 9 K S K * K * 10 ## ## ## ## ## ## ## ## 11 M 12 P *#PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 13 # ########################################## 15 14 # # 16 P 15 P # P# # 17 16 # ## # 18 ##19 P # P##17 * # N *PP* * # 18 P # P#####PPP##PP######PP##PP## # 20 19 # ## # 21 22 P 20 * # # 21 P # P# # 23 22 # ## # 24 # # 25 P # P# # 26 # # # # 27 #* * # * * # 28 ### ## ### # 29 # # # 30 # S # # 31 #####################################PPPPPPPPP PPPPPPPPPP PPPPPPPP 23 # M # 24 P # P# #PP##PPP##PP##PP##PP#### 25 # ## #SSSSSSSSSSSSSSSSSSSSSS# 26 #* *# #SSSSSSSSSSSSSSSSSSSSSS# 27 ### ### #SSSSSSSSSSSSSSSSSSSSSS# 28 #* #SSSSSSSSSSSSSSSSSSSSSS# 29 # M *#SSSSSSSSSSSSSSSSSSSSSS# 30 #####################################PPPPPPPPPPPPPPPPPPPPPPP PPPPPPPPPPPP 31 # # 32 # E # 33 # # 34 ###### 35 36 -
2014/30/LauriR/tesohyppelytestaus/tesohyppelytestaus/tesohyppelytestausContent/tesohyppelytestausContent.contentproj
r5624 r5642 167 167 </Compile> 168 168 </ItemGroup> 169 <ItemGroup> 170 <Compile Include="exit.png"> 171 <Name>exit</Name> 172 <Importer>TextureImporter</Importer> 173 <Processor>TextureProcessor</Processor> 174 </Compile> 175 </ItemGroup> 169 176 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 170 177 <!-- 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.