Changeset 6287
- Timestamp:
- 2015-06-24 19:46:59 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun.cs
r6286 r6287 483 483 mage.Position = position; 484 484 mage.Y += mage.Height / 2.0; 485 mage.Animation = new Animation(firemageAnimation);486 mage.Animation.Start();487 485 mage.Tag = "burn"; 486 mage.AnimWalk = new Animation(firemageAnimation); 488 487 mage.CollisionIgnoreGroup = 3; 489 488 Add(mage, 1); 490 489 490 // Pään päällä oleva liekki (taitaa olla vähän huonossa kohtaa tällä hetkellä) 491 491 GameObject flame = new GameObject(width * 1.4, height * 2); 492 492 flame.Y += mage.Height * 0.65; … … 494 494 flame.Animation.Start(); 495 495 mage.Add(flame); 496 497 PlatformWandererBrain brain = new PlatformWandererBrain(); 498 brain.Speed = 20; 499 brain.FallsOffPlatforms = false; 500 mage.Brain = brain; 501 502 // TODO: Noita kuolee kun on loiskuteltu tarpeeksi maitoa sen päälle. Vain yläpuolelta tulevat maitopartikkelit vahingoittaa sitä. 503 504 // TODO: Tulta pitäisi taikoa vain kun pelaajat on lähellä. 505 506 // Taiotaan tulta välillä. 507 var castTimer = new Timer { Interval = 10.0 }; 508 castTimer.Timeout += delegate 509 { 510 // TODO: Kävelyanimaatio pysähtyy jostain syystä tämän animaation jälkeen. 511 mage.PlayAnimation(firemageCastAnimation); 512 513 for (int i = 0; i < 6; i++) 514 { 515 PhysicsObject fire = new PhysicsObject(30, 60); 516 fire.CanRotate = false; 517 fire.Tag = "fire"; 518 fire.Animation = new Animation(blaze) { FPS = RandomGen.NextInt(20, 26) }; 519 fire.Animation.Step(RandomGen.NextInt(0, 12)); 520 fire.Animation.Resume(); 521 fire.X = mage.X + RandomGen.NextDouble(-300, 300); 522 fire.Y = mage.Y + mage.Height * 1.5; 523 fire.CollisionIgnoreGroup = 3; 524 Add(fire); 525 526 AddCollisionHandler(fire, "milkparticle", delegate(PhysicsObject c, PhysicsObject particle) 527 { 528 particle.Destroy(); 529 fire.Destroy(); 530 }); 531 } 532 }; 533 castTimer.Start(); 496 534 } 497 535
Note: See TracChangeset
for help on using the changeset viewer.