- Timestamp:
- 2016-06-16 14:35:00 (7 years ago)
- Location:
- 2015/koodauskerho/AarniAR
- Files:
-
- 24 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/koodauskerho/AarniAR/GunDown/GunDown/GunDown/GunDown.cs
r7325 r7375 10 10 { 11 11 const double nopeus = 200; 12 const double hyppyNopeus = 7 50;12 const double hyppyNopeus = 700; 13 13 const int RUUDUN_KOKO = 40; 14 14 DoubleMeter elamaLaskuri; … … 45 45 Image flameshotKuva = LoadImage("Flame"); 46 46 Image medkitKuva = LoadImage("MedKit"); 47 Image slimekuva = LoadImage("SlimeNew"); 47 48 48 49 49 50 SoundEffect maaliAani = LoadSoundEffect("maali"); 51 SoundEffect GunShot = LoadSoundEffect("GunShto"); 52 SoundEffect dedAani = LoadSoundEffect("ded"); 50 53 51 54 public override void Begin() … … 83 86 kentta.SetTileMethod('F', LisaaFlamer); 84 87 kentta.SetTileMethod('M', LisaaMedKit); 88 kentta.SetTileMethod('G', LisaaSlime); 85 89 86 90 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); … … 135 139 pelaajan1Ase.InfiniteAmmo = true; 136 140 pelaajan1Ase.Image = aseenkuvaOikea; 137 pelaajan1Ase.FireRate = 3;141 pelaajan1Ase.FireRate = 4; 138 142 pelaajan1Ase.X = 3; 139 143 pelaajan1Ase.Y = -3; … … 156 160 Keyboard.Listen(Key.E, ButtonState.Pressed, AsetaPommi, "Pelaaja asettaa pommin", pelaaja1); 157 161 Mouse.ListenMovement(0.0, Tahtaa, "Tähtää aseella"); 158 Mouse.Listen(MouseButton.Left, ButtonState. Down, AmmuAseella, "Pelaaja Ampuu", pelaajan1Ase);162 Mouse.Listen(MouseButton.Left, ButtonState.Pressed, AmmuAseella, "Pelaaja Ampuu", pelaajan1Ase); 159 163 160 164 … … 204 208 if (pelaaja1.IsDestroyed) 205 209 return; 210 GunShot.Play(); 206 211 207 212 PhysicsObject ammus = ase.Shoot(); … … 299 304 300 305 PlatformWandererBrain tasoAivot = new PlatformWandererBrain(); 301 tasoAivot.Speed = 100;306 tasoAivot.Speed = 200; 302 307 303 308 crab.Brain = tasoAivot; … … 356 361 void LisaaSpike(Vector paikka, double leveys, double korkeus) 357 362 { 358 PhysicsObject spike = PhysicsObject.CreateStaticObject(leveys, korkeus - 10);363 PhysicsObject spike = PhysicsObject.CreateStaticObject(leveys, korkeus -3); 359 364 spike.Position = paikka; 360 365 spike.Image = spikeKuva; … … 365 370 { 366 371 ElamaLoppui(); 367 MessageDisplay.Add("You Died...");372 368 373 369 374 } … … 387 392 MessageDisplay.Add("You Died..."); 388 393 pelaaja1.Destroy(); 394 dedAani.Play(); 389 395 Timer.SingleShot(1.0, delegate { SeuraavaKentta(); }); 390 396 } … … 397 403 flamer.Mass = 4.0; 398 404 flamer.Position = paikka; 399 flamer.Tag = "vihu";405 400 406 flamer.MakeStatic(); 401 407 flamer.CollisionIgnoreGroup = 5; … … 403 409 Add(flamer); 404 410 Timer Ajastin = new Timer(); 405 Ajastin.Interval = 0. 8;411 Ajastin.Interval = 0.9; 406 412 Ajastin.Timeout += delegate 407 413 { … … 425 431 if (kenttaNro == 1) LuoKentta(); 426 432 else if (kenttaNro == 2) LuoKentta(); 427 else if (kenttaNro > 2) Exit(); 433 else if (kenttaNro == 3) LuoKentta(); 434 else if (kenttaNro > 3) Exit(); 428 435 429 436 LisaaNappaimet(); … … 455 462 { 456 463 elamaLaskuri.Value += 5; 464 maaliAani.Play(); 457 465 Kohde.Destroy(); 458 466 } 467 void LisaaSlime(Vector paikka, double leveys, double korkeus) 468 { 469 470 Vihu slime = new Vihu(leveys, korkeus * 0.5); 471 slime.Image = slimekuva; 472 473 slime.Mass = 4.0; 474 slime.Position = paikka; 475 slime.Tag = "vihu"; 476 Add(slime); 477 478 PlatformWandererBrain tasoAivot = new PlatformWandererBrain(); 479 tasoAivot.Speed = 100; 480 481 slime.Brain = tasoAivot; 482 } 459 483 } -
2015/koodauskerho/AarniAR/GunDown/GunDown/GunDown/GunDown.csproj.Debug.cachefile
r7325 r7375 42 42 Content\kentta2.xnb 43 43 Content\MedKit.xnb 44 Content\Slime.xnb 45 Content\kentta3.xnb 46 Content\SlimeNew.xnb 47 Content\gunshot.xnb 48 Content\GunShto.xnb 49 Content\ded.xnb 50 Content\gunshot.wma -
2015/koodauskerho/AarniAR/GunDown/GunDown/GunDown/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml
r7325 r7375 117 117 <Options>None</Options> 118 118 <Output>C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\kentta1.xnb</Output> 119 <Time>2016-06-1 5T13:40:24.9398116+03:00</Time>119 <Time>2016-06-16T13:08:42.9559238+03:00</Time> 120 120 </Item> 121 121 <Item> … … 378 378 <Options>None</Options> 379 379 <Output>C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\kentta2.xnb</Output> 380 <Time>2016-06-1 5T13:52:41.8402184+03:00</Time>380 <Time>2016-06-16T13:04:38.4364743+03:00</Time> 381 381 </Item> 382 382 <Item> … … 388 388 <Output>C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\MedKit.xnb</Output> 389 389 <Time>2016-06-15T12:39:28.5732759+03:00</Time> 390 </Item> 391 <Item> 392 <Source>Slime.png</Source> 393 <Name>Slime</Name> 394 <Importer>TextureImporter</Importer> 395 <Processor>TextureProcessor</Processor> 396 <Options>None</Options> 397 <Output>C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\Slime.xnb</Output> 398 <Time>2016-06-16T10:21:18.2762889+03:00</Time> 399 </Item> 400 <Item> 401 <Source>kentta3.txt</Source> 402 <Name>kentta3</Name> 403 <Importer>TextFileImporter</Importer> 404 <Processor>TextFileContentProcessor</Processor> 405 <Options>None</Options> 406 <Output>C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\kentta3.xnb</Output> 407 <Time>2016-06-16T13:22:20.9527153+03:00</Time> 408 </Item> 409 <Item> 410 <Source>SlimeNew.png</Source> 411 <Name>SlimeNew</Name> 412 <Importer>TextureImporter</Importer> 413 <Processor>TextureProcessor</Processor> 414 <Options>None</Options> 415 <Output>C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\SlimeNew.xnb</Output> 416 <Time>2016-06-16T13:30:17.6063759+03:00</Time> 417 </Item> 418 <Item> 419 <Source>gunshot.mp3</Source> 420 <Name>gunshot</Name> 421 <Importer>Mp3Importer</Importer> 422 <Processor>SongProcessor</Processor> 423 <Options>None</Options> 424 <Output>C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\gunshot.xnb</Output> 425 <Extra>C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\gunshot.wma</Extra> 426 <Time>2016-06-16T13:50:51.3342688+03:00</Time> 427 </Item> 428 <Item> 429 <Source>GunShto.wav</Source> 430 <Name>GunShto</Name> 431 <Importer>WavImporter</Importer> 432 <Processor>SoundEffectProcessor</Processor> 433 <Options>None</Options> 434 <Output>C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\GunShto.xnb</Output> 435 <Time>2016-06-16T13:54:55.0836378+03:00</Time> 436 </Item> 437 <Item> 438 <Source>ded.wav</Source> 439 <Name>ded</Name> 440 <Importer>WavImporter</Importer> 441 <Processor>SoundEffectProcessor</Processor> 442 <Options>None</Options> 443 <Output>C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\ded.xnb</Output> 444 <Time>2016-06-16T14:03:02.1886769+03:00</Time> 390 445 </Item> 391 446 <BuildSuccessful>true</BuildSuccessful> -
2015/koodauskerho/AarniAR/GunDown/GunDown/GunDown/obj/x86/Debug/GunDown.csproj.FileListAbsolute.txt
r7325 r7375 50 50 C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\kentta2.xnb 51 51 C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\MedKit.xnb 52 C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\Slime.xnb 53 C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\kentta3.xnb 54 C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\SlimeNew.xnb 55 C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\gunshot.xnb 56 C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\gunshot.wma 57 C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\GunShto.xnb 58 C:\MyTemp\AarniAR\GunDown\GunDown\GunDown\bin\x86\Debug\Content\ded.xnb -
2015/koodauskerho/AarniAR/GunDown/GunDown/GunDown/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt
r7325 r7375 42 42 Content\kentta2.xnb 43 43 Content\MedKit.xnb 44 Content\Slime.xnb 45 Content\kentta3.xnb 46 Content\SlimeNew.xnb 47 Content\gunshot.xnb 48 Content\gunshot.wma 49 Content\GunShto.xnb 50 Content\ded.xnb -
2015/koodauskerho/AarniAR/GunDown/GunDown/GunDownContent/GunDownContent.contentproj
r7325 r7375 340 340 </Compile> 341 341 </ItemGroup> 342 <ItemGroup> 343 <Compile Include="Slime.png"> 344 <Name>Slime</Name> 345 <Importer>TextureImporter</Importer> 346 <Processor>TextureProcessor</Processor> 347 </Compile> 348 </ItemGroup> 349 <ItemGroup> 350 <Compile Include="kentta3.txt"> 351 <Name>kentta3</Name> 352 <Importer>TextFileImporter</Importer> 353 <Processor>TextFileContentProcessor</Processor> 354 </Compile> 355 </ItemGroup> 356 <ItemGroup> 357 <Compile Include="SlimeNew.png"> 358 <Name>SlimeNew</Name> 359 <Importer>TextureImporter</Importer> 360 <Processor>TextureProcessor</Processor> 361 </Compile> 362 </ItemGroup> 363 <ItemGroup> 364 <Compile Include="gunshot.mp3"> 365 <Name>gunshot</Name> 366 <Importer>Mp3Importer</Importer> 367 <Processor>SongProcessor</Processor> 368 </Compile> 369 </ItemGroup> 370 <ItemGroup> 371 <Compile Include="GunShto.wav"> 372 <Name>GunShto</Name> 373 <Importer>WavImporter</Importer> 374 <Processor>SoundEffectProcessor</Processor> 375 </Compile> 376 </ItemGroup> 377 <ItemGroup> 378 <Compile Include="ded.wav"> 379 <Name>ded</Name> 380 <Importer>WavImporter</Importer> 381 <Processor>SoundEffectProcessor</Processor> 382 </Compile> 383 </ItemGroup> 342 384 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 343 385 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2015/koodauskerho/AarniAR/GunDown/GunDown/GunDownContent/kentta1.txt
r7325 r7375 4 4 # ########### T ########################## E # 5 5 # ########### ##########################TTTTTTTTTT T# 6 # ###########T T################################## 7 # # ###8 # # #T##9 # # TTT ###10 # F##11 # TTTTT TTTTTTTTTTTTTTT###6 # ###########T T####################################TT ## 7 # # ## 8 # # G T## 9 # # TTT F## 10 # TTTTTTTTTTTTTTT### 11 # TTTTT T# ########### 12 12 # T S ########### 13 # # D D D S C M########### 14 #TTTTTTTTTT#TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT################## 13 # # D D D S C M########### 14 #TTTTTTTTTT#TTTTTTTTTTTTTTTTTT TTTTTTTTTTTTTTT################## 15 ##############################sss################################# 15 16 ################################################################## 16 17 ################################################################## 17 18 ################################################################## 18 19 ################################################################## 19 ################################################################## -
2015/koodauskerho/AarniAR/GunDown/GunDown/GunDownContent/kentta2.txt
r7325 r7375 1 1 ############################################################ 2 2 # #### # 3 # #### 3 # #### D D D # 4 4 # ####SSS################### # 5 5 # #### # # 6 6 # #### ## # 7 7 # # S S # 8 # N 9 #TTTTTTTTTT TTTTTTTTTTTTTT ####T #######8 # N T G #C S S # 9 #TTTTTTTTTT#TTTTTTTTTTTTT ####T ####### 10 10 # #### ###### 11 # #### 11 # #### G ###### 12 12 # F### TTTTTTTTTSSSS###### 13 # D aD #### T######### ######13 # D D #### T######### ###### 14 14 # TTTTTTTTTTTTTTTTTT#### T########## ###### 15 15 # T########### ######
Note: See TracChangeset
for help on using the changeset viewer.