- Timestamp:
- 2015-07-24 11:37:22 (8 years ago)
- Location:
- 2015/30/NoelV/peli0.0.0.3/turhakepeli
- Files:
-
- 4 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/30/NoelV/peli0.0.0.3/turhakepeli/turhakepeli/turhakepeli/obj/x86/Debug/cachefile-{8C608BBB-CC9B-467B-9EA1-3FA736E42C66}-targetpath.txt
r6972 r7019 57 57 Content\hahmo.anim.xnb 58 58 Content\pimeys.xnb 59 Content\vihunHyokkaus.xnb 60 Content\tykki.xnb 59 61 Content\pelaaja.png 60 62 Content\valikko.png -
2015/30/NoelV/peli0.0.0.3/turhakepeli/turhakepeli/turhakepeli/obj/x86/Debug/turhakepeli.csproj.FileListAbsolute.txt
r6972 r7019 330 330 C:\MyTemp\NoelV\peli0.0.0.3\turhakepeli\turhakepeli\turhakepeli\bin\x86\Debug\Content\banana.xnb 331 331 C:\MyTemp\NoelV\peli0.0.0.3\turhakepeli\turhakepeli\turhakepeli\bin\x86\Debug\Content\pimeys.xnb 332 C:\MyTemp\NoelV\peli0.0.0.3\turhakepeli\turhakepeli\turhakepeli\bin\x86\Debug\Content\vihunHyokkaus.xnb 333 C:\MyTemp\NoelV\peli0.0.0.3\turhakepeli\turhakepeli\turhakepeli\bin\x86\Debug\Content\tykki.xnb -
2015/30/NoelV/peli0.0.0.3/turhakepeli/turhakepeli/turhakepeli/turhakepeli.cs
r6990 r7019 6 6 using Jypeli.Effects; 7 7 using Jypeli.Widgets; 8 9 ///@author Noel Väänänen 10 /// <summary> 11 /// Beer Wizzard 12 /// </summary> 8 13 9 14 public class turhakepeli : PhysicsGame … … 54 59 Image ammuksenKuva = LoadImage("banana"); 55 60 Image pimeysKuva = LoadImage("pimeys"); 61 Image VihunHyokkaus = LoadImage("vihunHyokkaus"); 62 Image TykinKuva = LoadImage("tykki"); 56 63 57 64 FollowerBrain seuraajanAivot; … … 59 66 bool saakoAmpua = true; 60 67 61 bool vihunHyokkausAjastin = true; 68 PhysicsObject tykki; 69 70 //bool vihunHyokkausAjastin = true; 62 71 63 72 … … 79 88 Image taustaKuva = LoadImage("maa"); 80 89 Timer energianKasvattaja; 90 Timer TykkiAmpuu; 81 91 82 92 public override void Begin() 83 93 { 84 94 //SetWindowSize(1900, 1060, false); 85 IsFullScreen = false;95 IsFullScreen = true; 86 96 AloitaPeli(); 87 97 … … 173 183 AddCollisionHandler(ammus, "manaLaatikko", HyokkausOsuu); 174 184 AddCollisionHandler(ammus, "muuri", HyokkausOsuu); 185 AddCollisionHandler(ammus, "tykki", HyokkausOsuu); 175 186 176 187 saakoAmpua = false; … … 344 355 ruudut.SetTileMethod(new Color(99, 39, 48), LuoPatsaanJalat); 345 356 ruudut.SetTileMethod(new Color(222, 255, 222), LuoKalja); 357 ruudut.SetTileMethod(new Color(110, 160, 160), LuoTykki); 346 358 347 359 … … 371 383 372 384 } 385 386 387 373 388 void LuoKypara(Vector paikka, double leveys, double korkeus) 374 389 { … … 409 424 Add(pisteNaytto); 410 425 } 426 427 void LuoTykki(Vector paikka, double leveys, double korkeus) 428 { 429 tykki = new PhysicsObject(leveys, korkeus); 430 tykki.Position = paikka; 431 tykki.Image = TykinKuva; 432 tykki.MakeStatic(); 433 tykki.Tag = "tykki"; 434 Add(tykki); 435 436 437 438 TykkiAmpuu = new Timer(); 439 TykkiAmpuu.Interval = 2.5; 440 441 TykkiAmpuu.Timeout += delegate { AmmuTykilla(); }; 442 443 TykkiAmpuu.Start(); 444 445 446 447 } 448 449 void AmmuTykilla() 450 { 451 LuoTykinAmmus(new Vector(0, 10000)); 452 LuoTykinAmmus(new Vector(0, -10000)); 453 LuoTykinAmmus(new Vector(10000, 0)); 454 LuoTykinAmmus(new Vector(-10000, 0)); 455 } 456 457 458 459 void LuoTykinAmmus(Vector ammuksenSuunta) 460 { 461 PhysicsObject tykinAmmus = new PhysicsObject(20, 20); 462 tykinAmmus.Position = tykki.Position; 463 tykinAmmus.Tag = "vihunHyokkaus"; 464 tykinAmmus.LifetimeLeft = TimeSpan.FromSeconds(1.5); 465 tykinAmmus.CanRotate = false; 466 tykinAmmus.IgnoresCollisionResponse = true; 467 tykinAmmus.Image = VihunHyokkaus; 468 Add(tykinAmmus, -3); 469 tykinAmmus.Push(ammuksenSuunta); 470 471 AddCollisionHandler(tykinAmmus, "muuri", HyokkausOsuu); 472 473 } 474 475 411 476 412 477 void LuoAlaseina(Vector paikka, double leveys, double korkeus) … … 569 634 hitbox.X = pelaaja.X; 570 635 hitbox.Tag = "pelaajaHitbox"; 571 //hitbox.Color = Color.Transparent;636 hitbox.Color = Color.Transparent; 572 637 hitbox.CollisionIgnoreGroup = 5; 573 638 //hitbox.Image = hyokkauksenKuva; … … 632 697 vihollinen.Restitution = 0.0; 633 698 vihollinen.Tag = "vihu"; 699 bool vihunHyokkausAjastin = true; 634 700 //vihollinen.Color = Color.Red; 635 701 //vihollinen.Color = new Color(63, 0, 63); … … 639 705 seuraajanAivot.Speed = 70.0; 640 706 seuraajanAivot.DistanceFar = 500; 641 seuraajanAivot.DistanceClose = 6 0;707 seuraajanAivot.DistanceClose = 65; 642 708 seuraajanAivot.TurnWhileMoving = false; 643 709 … … 648 714 if (vihunHyokkausAjastin == true) 649 715 { 650 PhysicsObject vihunHyokkaus = new PhysicsObject(1 00, 100);716 PhysicsObject vihunHyokkaus = new PhysicsObject(140, 140); 651 717 vihunHyokkaus.Position = vihollinen.Position; 652 718 vihunHyokkaus.Tag = "vihunHyokkaus"; 653 719 vihunHyokkaus.LifetimeLeft = TimeSpan.FromSeconds(0.5); 654 Add(vihunHyokkaus); 655 720 vihunHyokkaus.CanRotate = false; 721 vihunHyokkaus.IgnoresCollisionResponse = true; 722 vihunHyokkaus.Shape = Shape.Circle; 723 vihunHyokkaus.Image = VihunHyokkaus; 724 Add(vihunHyokkaus, -3); 725 AxleJoint liitos = new AxleJoint(vihollinen, vihunHyokkaus); 656 726 vihunHyokkausAjastin = false; 657 658 Timer.SingleShot(0.5, delegate { vihunHyokkausAjastin = true; }); 727 Timer.SingleShot(0.9, delegate { vihunHyokkausAjastin = true; }); 659 728 } 660 729 … … 888 957 hyokkaus.Destroy(); 889 958 } 959 if (kohde.Tag.Equals("muuri")) 960 { 961 hyokkaus.Destroy(); 962 } 963 if (hyokkaus.Tag.Equals("ammus")) 964 { 965 if (kohde.Tag.Equals("tykki")) 966 { 967 hyokkaus.Destroy(); 968 } 969 } 970 890 971 891 972 … … 903 984 if ((kohde as Vihu).ElamaLaskuri.Value <= 0) 904 985 { 905 // 4LuoEnkka(kohde.Position, 60, 60);986 //LuoEnkka(kohde.Position, 60, 60); 906 987 kohde.Destroy(); 907 988 vihollistenMaara.Value--; … … 1028 1109 Mouse.IsCursorVisible = false; 1029 1110 1030 if (kenttaNro == 1) LuoKentta("kentta 02");1111 if (kenttaNro == 1) LuoKentta("kentta"); 1031 1112 else if (kenttaNro == 2) LuoKentta("kentta02"); 1032 1113 else if (kenttaNro == 3) LuoKentta("kentta03"); … … 1094 1175 1095 1176 1096 enkkaLaskuri.Value --;1177 enkkaLaskuri.Value -= 5; 1097 1178 //vihu.Stop(); 1098 1179 } -
2015/30/NoelV/peli0.0.0.3/turhakepeli/turhakepeli/turhakepeli/turhakepeli.csproj.Debug.cachefile
r6972 r7019 57 57 Content\hahmo.anim.xnb 58 58 Content\pimeys.xnb 59 Content\vihunHyokkaus.xnb 60 Content\tykki.xnb 59 61 Content\pelaaja.png 60 62 Content\valikko.png -
2015/30/NoelV/peli0.0.0.3/turhakepeli/turhakepeli/turhakepeliContent/obj/x86/Debug/ContentPipeline.xml
r6972 r7019 9 9 <Options>None</Options> 10 10 <Output>C:\MyTemp\NoelV\peli0.0.0.3\turhakepeli\turhakepeli\turhakepeli\bin\x86\Debug\Content\kentta.xnb</Output> 11 <Time>2015-07-2 3T11:12:41.8391906+03:00</Time>11 <Time>2015-07-24T10:40:05.4636776+03:00</Time> 12 12 </Item> 13 13 <Item> … … 523 523 <Output>C:\MyTemp\NoelV\peli0.0.0.3\turhakepeli\turhakepeli\turhakepeli\bin\x86\Debug\Content\pimeys.xnb</Output> 524 524 <Time>2015-07-23T11:41:36.0098395+03:00</Time> 525 </Item> 526 <Item> 527 <Source>vihunHyokkaus.png</Source> 528 <Name>vihunHyokkaus</Name> 529 <Importer>TextureImporter</Importer> 530 <Processor>TextureProcessor</Processor> 531 <Options>None</Options> 532 <Output>C:\MyTemp\NoelV\peli0.0.0.3\turhakepeli\turhakepeli\turhakepeli\bin\x86\Debug\Content\vihunHyokkaus.xnb</Output> 533 <Time>2015-07-24T09:53:22.2040726+03:00</Time> 534 </Item> 535 <Item> 536 <Source>tykki.png</Source> 537 <Name>tykki</Name> 538 <Importer>TextureImporter</Importer> 539 <Processor>TextureProcessor</Processor> 540 <Options>None</Options> 541 <Output>C:\MyTemp\NoelV\peli0.0.0.3\turhakepeli\turhakepeli\turhakepeli\bin\x86\Debug\Content\tykki.xnb</Output> 542 <Time>2015-07-24T11:12:36.4855267+03:00</Time> 525 543 </Item> 526 544 <BuildSuccessful>true</BuildSuccessful> -
2015/30/NoelV/peli0.0.0.3/turhakepeli/turhakepeli/turhakepeliContent/turhakepeliContent.contentproj
r6972 r7019 465 465 </Compile> 466 466 </ItemGroup> 467 <ItemGroup> 468 <Compile Include="vihunHyokkaus.png"> 469 <Name>vihunHyokkaus</Name> 470 <Importer>TextureImporter</Importer> 471 <Processor>TextureProcessor</Processor> 472 </Compile> 473 </ItemGroup> 474 <ItemGroup> 475 <Compile Include="tykki.png"> 476 <Name>tykki</Name> 477 <Importer>TextureImporter</Importer> 478 <Processor>TextureProcessor</Processor> 479 </Compile> 480 </ItemGroup> 467 481 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 468 482 <!-- 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.