- Timestamp:
- 2015-06-25 15:00:20 (8 years ago)
- Location:
- 2015/26/RasmusP/DungeonClasher
- Files:
-
- 16 added
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasher/DungeonClasher.cs
r6343 r6369 9 9 class mob : PhysicsObject 10 10 { 11 private IntMeter elamaLaskuri = new IntMeter(25 ,0, 25);11 private IntMeter elamaLaskuri = new IntMeter(25 ,0, 130); 12 12 public IntMeter ElamaLaskuri { get { return elamaLaskuri; } } 13 13 … … 30 30 Image taustaKuva = LoadImage("TaustaKuva"); 31 31 Image tyrmaSeina = LoadImage("DunegonWall"); 32 Image ritari = LoadImage("Ritari"); 33 34 private Image[] pelaajahyokkaa = LoadImages("Ritari", "Ritarihyokkaa"); 32 35 33 36 PlatformCharacter pelaaja; 34 37 PhysicsObject miekka; 38 Image miekkaKuva2 = LoadImage("Miekka2"); 35 39 36 40 … … 71 75 void SeuraavaKentta() 72 76 { 73 ClearAll();77 74 78 if (kenttaNro > 6) 75 79 { MessageDisplay.Add("voitit pelin"); } 76 else { LuoKentta(); }80 else { ClearAll(); LuoKentta(); } 77 81 78 82 83 84 85 79 86 } 80 87 void LuoKentta() … … 102 109 Mouse.IsCursorVisible = true; 103 110 104 Camera.ZoomToLevel(); 111 Camera.Follow(pelaaja); 112 Camera.Zoom(1.75); 113 Level.Background.Color = Color.Black; 105 114 } 106 115 … … 132 141 133 142 seina.Position = paikka; 134 seina.Y = lattia.Y + lattia.Height / 2; 135 136 137 143 144 138 145 139 146 } … … 208 215 { 209 216 PhysicsObject lattia = PhysicsObject.CreateStaticObject(leveys, korkeus); 210 lattia.Position = paikka;217 211 218 lattia.Color = Color.Brown; 212 219 lattia.Image = tiiliskivi; 220 221 lattia.Position = paikka; 222 lattia.Y -= 20 - lattia.Height * 0.5; 223 213 224 Add(lattia); 214 225 215 226 216 227 } 217 228 … … 239 250 Boss.Tag = "Enimy"; 240 251 252 Boss.ElamaLaskuri.LowerLimit += delegate 253 { 254 { kenttaNro++; SeuraavaKentta(); } 255 }; 256 241 257 242 258 Add(Boss); … … 257 273 void LuoPelaaja(Vector paikka, Double leveys, Double korkeus) 258 274 { 259 pelaaja = new PlatformCharacter( 40, 120);275 pelaaja = new PlatformCharacter(64, 128); 260 276 pelaaja.Position = paikka; 261 277 pelaaja.Y -= 20 - pelaaja.Height * 0.5; 262 278 //pelaaja.Elamat = 3; 263 279 pelaaja.Color = Color.Black; 280 pelaaja.Image = ritari; 264 281 265 282 elamaLaskuri.LowerLimit += delegate { pelaaja.Destroy(); }; … … 267 284 ProgressBar elamaPalkki = new ProgressBar(150, 20); 268 285 elamaPalkki.X = Screen.Left + 150; 269 elamaPalkki.Y = Screen.Top - 20;286 elamaPalkki.Y = Screen.Top - 75; 270 287 elamaPalkki.BindTo(elamaLaskuri); 271 288 Add(elamaPalkki); … … 280 297 AddCollisionHandler(pelaaja, "Boss", PelaajaOsuiBossiin); 281 298 299 300 301 282 302 } 283 303 void PelaajaOsui(PhysicsObject pelaaja, PhysicsObject kohde) … … 294 314 void IskeMiekalla() 295 315 { 316 //Image miekantoinenkuva = miekkaKuva.; 296 317 if (!miekkaEsille) 297 318 { … … 300 321 miekka.X = pelaaja.X + pelaaja.Width / 2; 301 322 miekka.Image = miekkaKuva; 323 324 302 325 miekka.IgnoresCollisionResponse = true; 303 326 miekka.IgnoresGravity = true; 304 327 miekka.Y = pelaaja.Y; 305 Add(miekka );328 Add(miekka, 2); 306 329 Timer.SingleShot(1, delegate { miekka.Destroy(); miekkaEsille = false; }); 307 330 … … 310 333 Timer MiekanLiikutus = new Timer(); 311 334 MiekanLiikutus.Interval = 0.01; 312 MiekanLiikutus.Timeout += delegate { miekka.Position = pelaaja.Position + pelaaja.FacingDirection.GetVector() * 33; }; 335 MiekanLiikutus.Timeout += delegate 336 { 337 miekka.Position = pelaaja.Position + pelaaja.FacingDirection.GetVector() * 33; 338 if (pelaaja.FacingDirection == Direction.Left) 339 { 340 miekka.Image = miekkaKuva2; 341 } 342 else { miekka.Image = miekkaKuva; } 343 }; 313 344 MiekanLiikutus.Start(); 314 345 315 316 346 pelaaja.Animation = new Animation(pelaajahyokkaa); 347 348 pelaaja.Animation.Start(); 349 pelaaja.Animation.FPS = 8; 350 Timer.SingleShot(2, delegate { pelaaja.Animation.Stop(); }); 317 351 318 352 -
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasher/DungeonClasher.csproj.Debug.cachefile
r6343 r6369 9 9 Content\TaustaKuva.xnb 10 10 Content\DunegonWall.xnb 11 Content\Miekka2.xnb 12 Content\Ritarihyokkaa.xnb 13 Content\Ritari.xnb 11 14 Content\kentta1.txt 12 15 Content\kentta2.txt -
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasher/bin/x86/Debug/Content/kentta1.txt
r6343 r6369 6 6 ............................................. 7 7 ............................................. 8 ..D....D....D....D....D....D....D....D....D.. 8 9 ............................................. 9 DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD10 10 ..P........................=.......=.....=... 11 11 ********************************************* -
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasher/bin/x86/Debug/Content/kentta2.txt
r6241 r6369 6 6 ............................................. 7 7 ............................................. 8 .. ...........................................8 ..D....D....D....D....D....D....D....D....D.. 9 9 ............................................. 10 10 .P........=.....=......=.................=... -
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasher/bin/x86/Debug/Content/kentta3.txt
r6241 r6369 1 ............................................. ..2 ............................................. ..3 ............................................. ..4 ............................................. ..5 ............................................. ..6 ............................................. ..7 ............................................. ..8 .. .............................................9 ............................................. ..10 .P...=....=.....=......=.......=.........=...=. 11 ********************************************* **1 ............................................. 2 ............................................. 3 ............................................. 4 ............................................. 5 ............................................. 6 ............................................. 7 ............................................. 8 ..D....D....D....D....D....D....D....D....D.. 9 ............................................. 10 P...=....=.....=......=.......=.........=...= 11 ********************************************* -
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasher/bin/x86/Debug/Content/kentta4.txt
r6241 r6369 1 ............................................. ..2 ............................................. ..3 ............................................. ..4 ............................................. ..5 ............................................. ..6 ............................................. ..7 ............................................. ..8 .. .............................................9 ............................................. ..10 .P...=....=.....=...................... ..=...=.11 ********************************************* **1 ............................................. 2 ............................................. 3 ............................................. 4 ............................................. 5 ............................................. 6 ............................................. 7 ............................................. 8 ..D....D....D....D....D....D....D....D....D.. 9 ............................................. 10 .P...=....=.....=......................=...=. 11 ********************************************* -
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasher/bin/x86/Debug/Content/kentta5.txt
r6241 r6369 1 ............................................. ..2 ............................................. ..3 ............................................. ..4 ............................................. ..5 ............................................. ..6 ............................................. ..7 ............................................. ..8 .. .............................................9 ............................................. ..10 .P...=....=.....=...................... ..=...=.11 ********************************************* **1 ............................................. 2 ............................................. 3 ............................................. 4 ............................................. 5 ............................................. 6 ............................................. 7 ............................................. 8 ..D....D....D....D....D....D....D....D....D.. 9 ............................................. 10 .P...=....=.....=......................=...=. 11 ********************************************* -
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasher/bin/x86/Debug/Content/kentta6.txt
r6260 r6369 1 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk 2 kkkkkk..........kkkkkkk......kkkkkkk.......kkkk 3 kkk...............kkkk.........kkk..........kkk 4 kk..................kk..........kk...........kk 5 k.............................................k 6 k.............................................k 7 ............................................... 8 ............................................... 9 ............................................... 10 ............................................... 11 ............................................... 12 ............................................... 13 .P............................................B 14 *********************************************** 1 2 ............................................. 3 ............................................. 4 ..D....D....D....D....D....D....D....D....D.. 5 ............................................. 6 .P..........................................B 7 ********************************************* -
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasher/obj/x86/Debug/ContentPipeline-{9E8A5BF1-0124-4B72-B960-7241168C215B}.xml
r6343 r6369 9 9 <Options>None</Options> 10 10 <Output>C:\MyTemp\RasmusP\Hi\DungeonClasher\DungeonClasher\DungeonClasher\bin\x86\Debug\Content\kentta1.xnb</Output> 11 <Time>2015-06-25T1 1:21:10.4047828+03:00</Time>11 <Time>2015-06-25T12:25:08.0171828+03:00</Time> 12 12 </Item> 13 13 <Item> … … 18 18 <Options>None</Options> 19 19 <Output>C:\MyTemp\RasmusP\Hi\DungeonClasher\DungeonClasher\DungeonClasher\bin\x86\Debug\Content\Tiiliskivi.xnb</Output> 20 <Time>2015-06-2 4T10:00:01.4024062+03:00</Time>20 <Time>2015-06-25T13:28:47.9960828+03:00</Time> 21 21 </Item> 22 22 <Item> … … 27 27 <Options>None</Options> 28 28 <Output>C:\MyTemp\RasmusP\Hi\DungeonClasher\DungeonClasher\DungeonClasher\bin\x86\Debug\Content\kentta2.xnb</Output> 29 <Time>2015-06-2 4T11:27:02.7486062+03:00</Time>29 <Time>2015-06-25T13:31:13.0244828+03:00</Time> 30 30 </Item> 31 31 <Item> … … 36 36 <Options>None</Options> 37 37 <Output>C:\MyTemp\RasmusP\Hi\DungeonClasher\DungeonClasher\DungeonClasher\bin\x86\Debug\Content\kentta3.xnb</Output> 38 <Time>2015-06-2 4T11:28:55.3406062+03:00</Time>38 <Time>2015-06-25T13:33:33.2288828+03:00</Time> 39 39 </Item> 40 40 <Item> … … 45 45 <Options>None</Options> 46 46 <Output>C:\MyTemp\RasmusP\Hi\DungeonClasher\DungeonClasher\DungeonClasher\bin\x86\Debug\Content\kentta4.xnb</Output> 47 <Time>2015-06-2 4T11:29:40.6816062+03:00</Time>47 <Time>2015-06-25T13:34:32.5456828+03:00</Time> 48 48 </Item> 49 49 <Item> … … 54 54 <Options>None</Options> 55 55 <Output>C:\MyTemp\RasmusP\Hi\DungeonClasher\DungeonClasher\DungeonClasher\bin\x86\Debug\Content\kentta5.xnb</Output> 56 <Time>2015-06-2 4T11:29:51.9146062+03:00</Time>56 <Time>2015-06-25T13:34:32.5456828+03:00</Time> 57 57 </Item> 58 58 <Item> … … 63 63 <Options>None</Options> 64 64 <Output>C:\MyTemp\RasmusP\Hi\DungeonClasher\DungeonClasher\DungeonClasher\bin\x86\Debug\Content\kentta6.xnb</Output> 65 <Time>2015-06-25T 09:41:00.1578828+03:00</Time>65 <Time>2015-06-25T13:35:51.3752828+03:00</Time> 66 66 </Item> 67 67 <Item> … … 91 91 <Output>C:\MyTemp\RasmusP\Hi\DungeonClasher\DungeonClasher\DungeonClasher\bin\x86\Debug\Content\DunegonWall.xnb</Output> 92 92 <Time>2015-06-25T11:16:33.7919828+03:00</Time> 93 </Item> 94 <Item> 95 <Source>Miekka2.png</Source> 96 <Name>Miekka2</Name> 97 <Importer>TextureImporter</Importer> 98 <Processor>TextureProcessor</Processor> 99 <Options>None</Options> 100 <Output>C:\MyTemp\RasmusP\Hi\DungeonClasher\DungeonClasher\DungeonClasher\bin\x86\Debug\Content\Miekka2.xnb</Output> 101 <Time>2015-06-25T13:25:21.0566828+03:00</Time> 102 </Item> 103 <Item> 104 <Source>Ritarihyokkaa.png</Source> 105 <Name>Ritarihyokkaa</Name> 106 <Importer>TextureImporter</Importer> 107 <Processor>TextureProcessor</Processor> 108 <Options>None</Options> 109 <Output>C:\MyTemp\RasmusP\Hi\DungeonClasher\DungeonClasher\DungeonClasher\bin\x86\Debug\Content\Ritarihyokkaa.xnb</Output> 110 <Time>2015-06-25T14:43:48.9060828+03:00</Time> 111 </Item> 112 <Item> 113 <Source>Ritari.png</Source> 114 <Name>Ritari</Name> 115 <Importer>TextureImporter</Importer> 116 <Processor>TextureProcessor</Processor> 117 <Options>None</Options> 118 <Output>C:\MyTemp\RasmusP\Hi\DungeonClasher\DungeonClasher\DungeonClasher\bin\x86\Debug\Content\Ritari.xnb</Output> 119 <Time>2015-06-25T14:56:41.5952828+03:00</Time> 93 120 </Item> 94 121 <BuildSuccessful>true</BuildSuccessful> -
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasher/obj/x86/Debug/DungeonClasher.csproj.FileListAbsolute.txt
r6343 r6369 33 33 C:\MyTemp\RasmusP\Hi\DungeonClasher\DungeonClasher\DungeonClasher\bin\x86\Debug\Content\TaustaKuva.xnb 34 34 C:\MyTemp\RasmusP\Hi\DungeonClasher\DungeonClasher\DungeonClasher\bin\x86\Debug\Content\DunegonWall.xnb 35 C:\MyTemp\RasmusP\Hi\DungeonClasher\DungeonClasher\DungeonClasher\bin\x86\Debug\Content\Miekka2.xnb 36 C:\MyTemp\RasmusP\Hi\DungeonClasher\DungeonClasher\DungeonClasher\bin\x86\Debug\Content\Ritarihyokkaa.xnb 37 C:\MyTemp\RasmusP\Hi\DungeonClasher\DungeonClasher\DungeonClasher\bin\x86\Debug\Content\Ritari.xnb -
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasher/obj/x86/Debug/cachefile-{9E8A5BF1-0124-4B72-B960-7241168C215B}-targetpath.txt
r6343 r6369 9 9 Content\TaustaKuva.xnb 10 10 Content\DunegonWall.xnb 11 Content\Miekka2.xnb 12 Content\Ritarihyokkaa.xnb 13 Content\Ritari.xnb 11 14 Content\kentta1.txt 12 15 Content\kentta2.txt -
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasherContent/DungeonClasherContent.contentproj
r6343 r6369 54 54 </ItemGroup> 55 55 <ItemGroup> 56 <Compile Include="Ritari.png"> 57 <Name>Ritari</Name> 58 <Importer>TextureImporter</Importer> 59 <Processor>TextureProcessor</Processor> 60 </Compile> 56 61 <Compile Include="Tiiliskivi.png"> 57 62 <Name>Tiiliskivi</Name> … … 113 118 </Compile> 114 119 </ItemGroup> 120 <ItemGroup> 121 <Compile Include="Miekka2.png"> 122 <Name>Miekka2</Name> 123 <Importer>TextureImporter</Importer> 124 <Processor>TextureProcessor</Processor> 125 </Compile> 126 </ItemGroup> 127 <ItemGroup> 128 <Compile Include="Ritarihyokkaa.png"> 129 <Name>Ritarihyokkaa</Name> 130 <Importer>TextureImporter</Importer> 131 <Processor>TextureProcessor</Processor> 132 </Compile> 133 </ItemGroup> 115 134 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 116 135 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasherContent/kentta1.txt
r6343 r6369 6 6 ............................................. 7 7 ............................................. 8 ..D....D....D....D....D....D....D....D....D.. 8 9 ............................................. 9 DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD10 10 ..P........................=.......=.....=... 11 11 ********************************************* -
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasherContent/kentta2.txt
r6241 r6369 6 6 ............................................. 7 7 ............................................. 8 .. ...........................................8 ..D....D....D....D....D....D....D....D....D.. 9 9 ............................................. 10 10 .P........=.....=......=.................=... -
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasherContent/kentta3.txt
r6241 r6369 1 ............................................. ..2 ............................................. ..3 ............................................. ..4 ............................................. ..5 ............................................. ..6 ............................................. ..7 ............................................. ..8 .. .............................................9 ............................................. ..10 .P...=....=.....=......=.......=.........=...=. 11 ********************************************* **1 ............................................. 2 ............................................. 3 ............................................. 4 ............................................. 5 ............................................. 6 ............................................. 7 ............................................. 8 ..D....D....D....D....D....D....D....D....D.. 9 ............................................. 10 P...=....=.....=......=.......=.........=...= 11 ********************************************* -
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasherContent/kentta4.txt
r6241 r6369 1 ............................................. ..2 ............................................. ..3 ............................................. ..4 ............................................. ..5 ............................................. ..6 ............................................. ..7 ............................................. ..8 .. .............................................9 ............................................. ..10 .P...=....=.....=...................... ..=...=.11 ********************************************* **1 ............................................. 2 ............................................. 3 ............................................. 4 ............................................. 5 ............................................. 6 ............................................. 7 ............................................. 8 ..D....D....D....D....D....D....D....D....D.. 9 ............................................. 10 .P...=....=.....=......................=...=. 11 ********************************************* -
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasherContent/kentta5.txt
r6241 r6369 1 ............................................. ..2 ............................................. ..3 ............................................. ..4 ............................................. ..5 ............................................. ..6 ............................................. ..7 ............................................. ..8 .. .............................................9 ............................................. ..10 .P...=....=.....=...................... ..=...=.11 ********************************************* **1 ............................................. 2 ............................................. 3 ............................................. 4 ............................................. 5 ............................................. 6 ............................................. 7 ............................................. 8 ..D....D....D....D....D....D....D....D....D.. 9 ............................................. 10 .P...=....=.....=......................=...=. 11 ********************************************* -
2015/26/RasmusP/DungeonClasher/DungeonClasher/DungeonClasherContent/kentta6.txt
r6260 r6369 1 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk 2 kkkkkk..........kkkkkkk......kkkkkkk.......kkkk 3 kkk...............kkkk.........kkk..........kkk 4 kk..................kk..........kk...........kk 5 k.............................................k 6 k.............................................k 7 ............................................... 8 ............................................... 9 ............................................... 10 ............................................... 11 ............................................... 12 ............................................... 13 .P............................................B 14 *********************************************** 1 2 ............................................. 3 ............................................. 4 ..D....D....D....D....D....D....D....D....D.. 5 ............................................. 6 .P..........................................B 7 *********************************************
Note: See TracChangeset
for help on using the changeset viewer.