- Timestamp:
- 2015-07-22 14:56:23 (8 years ago)
- Location:
- 2015/30/NoelV/peli0.0.0.3/turhakepeli
- Files:
-
- 7 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
r6878 r6931 54 54 Content\laatikkoAla3.xnb 55 55 Content\laatikkoYla3.xnb 56 Content\ammus.xnb 57 Content\banana.xnb 56 58 Content\pelaaja.png 57 59 Content\valikko.png -
2015/30/NoelV/peli0.0.0.3/turhakepeli/turhakepeli/turhakepeli/obj/x86/Debug/turhakepeli.csproj.FileListAbsolute.txt
r6878 r6931 327 327 C:\MyTemp\NoelV\peli0.0.0.3\turhakepeli\turhakepeli\turhakepeli\bin\x86\Debug\Content\laatikkoAla3.xnb 328 328 C:\MyTemp\NoelV\peli0.0.0.3\turhakepeli\turhakepeli\turhakepeli\bin\x86\Debug\Content\laatikkoYla3.xnb 329 C:\MyTemp\NoelV\peli0.0.0.3\turhakepeli\turhakepeli\turhakepeli\bin\x86\Debug\Content\ammus.xnb 330 C:\MyTemp\NoelV\peli0.0.0.3\turhakepeli\turhakepeli\turhakepeli\bin\x86\Debug\Content\banana.xnb -
2015/30/NoelV/peli0.0.0.3/turhakepeli/turhakepeli/turhakepeli/turhakepeli.cs
r6901 r6931 52 52 Image LaatikkoAla3 = LoadImage("laatikkoAla3"); 53 53 Image LaatikkoYla3 = LoadImage("laatikkoYla3"); 54 Image ammuksenKuva = LoadImage("banana"); 55 56 FollowerBrain seuraajanAivot; 54 57 55 58 bool saakoAmpua = true; … … 123 126 //Keyboard.Listen(Key.LeftShift, ButtonState.Down, Lataa, null); 124 127 //Keyboard.Listen(Key.LeftShift, ButtonState.Released, Ammu, null); 125 Keyboard.Listen(Key.Up, ButtonState.Down, LuoAmmus, null, new Vector(0, 100000));126 Keyboard.Listen(Key.Down, ButtonState.Down, LuoAmmus, null, new Vector(0, - 100000));127 Keyboard.Listen(Key.Left, ButtonState.Down, LuoAmmus, null, new Vector(- 100000, 0));128 Keyboard.Listen(Key.Right, ButtonState.Down, LuoAmmus, null, new Vector( 100000, 0));128 Keyboard.Listen(Key.Up, ButtonState.Down, LuoAmmus, null, new Vector(0, 50000)); 129 Keyboard.Listen(Key.Down, ButtonState.Down, LuoAmmus, null, new Vector(0, -50000)); 130 Keyboard.Listen(Key.Left, ButtonState.Down, LuoAmmus, null, new Vector(-50000, 0)); 131 Keyboard.Listen(Key.Right, ButtonState.Down, LuoAmmus, null, new Vector(50000, 0)); 129 132 130 133 … … 141 144 void LuoAmmus(Vector suunta) 142 145 { 143 if (saakoAmpua == true) 144 { 145 PhysicsObject ammus = new PhysicsObject(10.0, 10.0); 146 ammus.Position = pelaaja.Position; 147 ammus.Tag = "ammus"; 148 ammus.Push(suunta); 149 ammus.CollisionIgnoreGroup = 5; 150 ammus.CanRotate = false; 151 ammus.Lifetime = 152 Add(ammus); 153 154 AddCollisionHandler(ammus, "vihu", HyokkausOsuu); 155 AddCollisionHandler(ammus, "laatikko", HyokkausOsuu); 156 AddCollisionHandler(ammus, "potionLaatikko", HyokkausOsuu); 157 AddCollisionHandler(ammus, "manaLaatikko", HyokkausOsuu); 158 159 saakoAmpua = false; 160 161 Timer.SingleShot(0.5, delegate { saakoAmpua = true; }); 162 146 if (!energianKasvattaja.Enabled) 147 { 148 energianKasvattaja.Start(); 149 } 150 if (energiaLaskuri.Value > 0) 151 { 152 153 if (saakoAmpua == true) 154 { 155 PhysicsObject ammus = new PhysicsObject(40.0, 40.0); 156 ammus.Position = pelaaja.Position; 157 ammus.Tag = "ammus"; 158 ammus.Push(suunta); 159 ammus.CollisionIgnoreGroup = 5; 160 ammus.CanRotate = false; 161 ammus.LifetimeLeft = TimeSpan.FromSeconds(1.0); 162 ammus.Image = ammuksenKuva; 163 Add(ammus); 164 165 energiaLaskuri.Value -= 1; 166 167 AddCollisionHandler(ammus, "vihu", HyokkausOsuu); 168 AddCollisionHandler(ammus, "laatikko", HyokkausOsuu); 169 AddCollisionHandler(ammus, "potionLaatikko", HyokkausOsuu); 170 AddCollisionHandler(ammus, "manaLaatikko", HyokkausOsuu); 171 AddCollisionHandler(ammus, "muuri", HyokkausOsuu); 172 173 saakoAmpua = false; 174 175 Timer.SingleShot(0.8, delegate { saakoAmpua = true; }); 176 177 } 163 178 } 164 179 … … 337 352 energianKasvattaja = new Timer(); 338 353 energianKasvattaja.Interval = 1.5; 339 energianKasvattaja.Timeout += delegate { energiaLaskuri.Value++; if (energiaLaskuri.Value >= 10) energianKasvattaja.Stop(); }; 354 energianKasvattaja.Timeout += delegate { energiaLaskuri.Value++; }; 355 //energianKasvattaja.Timeout += delegate { energiaLaskuri.Value += 10; if (energiaLaskuri.Value >= 1000) energianKasvattaja.Stop(); }; 340 356 341 357 LuoVihuNaytto(); … … 370 386 PatsaanJalat.Image = PatsasAla; 371 387 PatsaanJalat.Shape = Shape.Circle; 388 PatsaanJalat.Tag = "muuri"; 372 389 Add(PatsaanJalat, 1); 373 390 } … … 391 408 ala.CollisionIgnoreGroup = 1; 392 409 ala.Image = alaseina; 410 ala.Tag = "muuri"; 393 411 Add(ala); 394 412 … … 401 419 vasenAla.CollisionIgnoreGroup = 1; 402 420 vasenAla.Image = VasenAla; 421 vasenAla.Tag = "muuri"; 403 422 Add(vasenAla); 404 423 … … 412 431 vasenYla.CollisionIgnoreGroup = 1; 413 432 vasenYla.Image = VasenYla; 433 vasenYla.Tag = "muuri"; 414 434 Add(vasenYla); 415 435 … … 423 443 YlempiOikeaYla.Image = ylempiOikeaYla; 424 444 YlempiOikeaYla.IgnoresCollisionResponse = true; 445 YlempiOikeaYla.Tag = "muuri"; 425 446 Add(YlempiOikeaYla, 3); 426 447 … … 434 455 YlempiVasenYla.Image = ylempiVasenYla; 435 456 YlempiVasenYla.IgnoresCollisionResponse = true; 457 YlempiVasenYla.Tag = "muuri"; 436 458 Add(YlempiVasenYla, 3); 437 459 … … 444 466 //YlempiOikeaAla.CollisionIgnoreGroup = 1; 445 467 YlempiOikeaAla.Image = ylempiOikeaAla; 446 //YlempiOikeaAla.IgnoresCollisionResponse = false; 447 Add(YlempiOikeaAla, 1); 468 YlempiOikeaAla.Tag = "muuri"; 469 YlempiOikeaAla.IgnoresCollisionResponse = true; 470 Add(YlempiOikeaAla, 3); 448 471 449 472 … … 455 478 //YlempiVasenAla.CollisionIgnoreGroup = 1; 456 479 YlempiVasenAla.Image = ylempiVasenYla; 480 YlempiVasenAla.Tag = "muuri"; 457 481 //YlempiVasenAla.IgnoresCollisionResponse = false; 458 482 Add(YlempiVasenAla, 1); … … 467 491 YlempiKeski.Image = ylempiKeski; 468 492 YlempiKeski.IgnoresCollisionResponse = true; 493 YlempiKeski.Tag = "muuri"; 469 494 Add(YlempiKeski, 3); 470 495 … … 479 504 muuri.CollisionIgnoreGroup = 1; 480 505 muuri.Image = OikeaAla; 506 muuri.Tag = "muuri"; 481 507 Add(muuri); 482 508 … … 561 587 taso.CollisionIgnoreGroup = 1; 562 588 taso.Image = sivuseina; 589 taso.Tag = "muuri"; 563 590 Add(taso); 564 591 } … … 569 596 ala.CollisionIgnoreGroup = 1; 570 597 ala.Image = OikeaYla; 598 ala.Tag = "muuri"; 571 599 Add(ala); 572 600 … … 603 631 604 632 //vihollinen.MoveTo(new Vector(RandomGen.NextDouble(Level.Left, Level.Right), Level.Bottom - 250), 500); //{ vihollisLaskuri.Value++; }); 605 FollowerBrainseuraajanAivot = new FollowerBrain(pelaaja);606 seuraajanAivot.Speed = 10.0;633 seuraajanAivot = new FollowerBrain(pelaaja); 634 seuraajanAivot.Speed = 70.0; 607 635 seuraajanAivot.DistanceFar = 300; 608 seuraajanAivot.DistanceClose = 50;636 seuraajanAivot.DistanceClose = 60; 609 637 seuraajanAivot.TurnWhileMoving = false; 610 seuraajanAivot.TargetClose += delegate611 {612 seuraajanAivot.Active = true;613 vihollinen.Hit(new Vector(0, -5000));614 615 };616 638 //seuraajanAivot.TargetClose += delegate 639 //{ 640 // seuraajanAivot.Active = true; 641 // vihollinen.Hit(new Vector(0, -5000)); 642 // 643 //}; 644 seuraajanAivot.StopWhenTargetClose = true; 617 645 vihollinen.Brain = seuraajanAivot; 618 646 vihollistenMaara.MaxValue++; … … 620 648 621 649 RandomMoverBrain kaukanaAivot = new RandomMoverBrain(); 622 kaukanaAivot.Speed = 0.000 1;650 kaukanaAivot.Speed = 0.000000000000000000000000001; 623 651 kaukanaAivot.TurnWhileMoving = false; 624 652 625 653 seuraajanAivot.FarBrain = kaukanaAivot; 626 654 … … 845 873 { 846 874 //Explosion rajahdys = new Explosion(150); 847 //rajahdys.Position = kohde.Position; w875 //rajahdys.Position = kohde.Position; 848 876 //rajahdys.ShockwaveColor = Color.Transparent; 849 877 //Add(rajahdys); … … 1015 1043 1016 1044 1017 turhake = new PhysicsObject(10, 10);1018 turhake.Color = new Color (63, 0, 63);1045 //turhake = new PhysicsObject(10, 10); 1046 //turhake.Color = new Color (63, 0, 63); 1019 1047 //Add(turhake); 1020 1048 Camera.FollowedObject = pelaaja; … … 1028 1056 if (vihu.Tag.Equals("vihu")) 1029 1057 { 1058 1059 //seuraajanAivot.Active = false; 1060 // 1061 //Timer pysautus = new Timer(); 1062 //pysautus.Interval = 1; 1063 //pysautus.Timeout += delegate 1064 //{ 1065 // seuraajanAivot.Active = true; 1066 //}; 1067 1068 1030 1069 1031 1070 enkkaLaskuri.Value--; … … 1141 1180 { 1142 1181 enkkaLaskuri.MaxValue += 5; 1143 enkkaLaskuri.Value -= 2;1182 enkkaLaskuri.Value -= 1; 1144 1183 energiaLaskuri.Value += 10; 1145 1184 kalja.Destroy(); -
2015/30/NoelV/peli0.0.0.3/turhakepeli/turhakepeli/turhakepeli/turhakepeli.csproj.Debug.cachefile
r6878 r6931 54 54 Content\laatikkoAla3.xnb 55 55 Content\laatikkoYla3.xnb 56 Content\ammus.xnb 57 Content\banana.xnb 56 58 Content\pelaaja.png 57 59 Content\valikko.png -
2015/30/NoelV/peli0.0.0.3/turhakepeli/turhakepeli/turhakepeliContent/obj/x86/Debug/ContentPipeline.xml
r6901 r6931 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 1T11:29:50+03:00</Time>11 <Time>2015-07-22T14:49:25.9519703+03:00</Time> 12 12 </Item> 13 13 <Item> … … 496 496 <Output>C:\MyTemp\NoelV\peli0.0.0.3\turhakepeli\turhakepeli\turhakepeli\bin\x86\Debug\Content\laatikkoYla3.xnb</Output> 497 497 <Time>2015-07-21T13:29:42+03:00</Time> 498 </Item> 499 <Item> 500 <Source>ammus.png</Source> 501 <Name>ammus</Name> 502 <Importer>TextureImporter</Importer> 503 <Processor>TextureProcessor</Processor> 504 <Options>None</Options> 505 <Output>C:\MyTemp\NoelV\peli0.0.0.3\turhakepeli\turhakepeli\turhakepeli\bin\x86\Debug\Content\ammus.xnb</Output> 506 <Time>2015-07-22T13:02:58.0600138+03:00</Time> 507 </Item> 508 <Item> 509 <Source>banana.png</Source> 510 <Name>banana</Name> 511 <Importer>TextureImporter</Importer> 512 <Processor>TextureProcessor</Processor> 513 <Options>None</Options> 514 <Output>C:\MyTemp\NoelV\peli0.0.0.3\turhakepeli\turhakepeli\turhakepeli\bin\x86\Debug\Content\banana.xnb</Output> 515 <Time>2015-07-22T13:12:18.6218138+03:00</Time> 498 516 </Item> 499 517 <BuildSuccessful>true</BuildSuccessful> -
2015/30/NoelV/peli0.0.0.3/turhakepeli/turhakepeli/turhakepeliContent/turhakepeliContent.contentproj
r6878 r6931 444 444 </Compile> 445 445 </ItemGroup> 446 <ItemGroup> 447 <Compile Include="ammus.png"> 448 <Name>ammus</Name> 449 <Importer>TextureImporter</Importer> 450 <Processor>TextureProcessor</Processor> 451 </Compile> 452 </ItemGroup> 453 <ItemGroup> 454 <Compile Include="banana.png"> 455 <Name>banana</Name> 456 <Importer>TextureImporter</Importer> 457 <Processor>TextureProcessor</Processor> 458 </Compile> 459 </ItemGroup> 446 460 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 447 461 <!-- 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.