- Timestamp:
- 2015-06-25 23:28:01 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun.cs
r6409 r6410 3 3 using System.Diagnostics.CodeAnalysis; 4 4 using System.Linq; 5 using System.Runtime.InteropServices; 5 6 using Jypeli; 6 7 using Jypeli.Assets; … … 229 230 private Animation tattiMageAnimation; 230 231 private Animation tattiMageCastAnimation; 232 private Animation fireballAnimation; 231 233 232 234 private Animation bossRiseAnimation; … … 247 249 248 250 private Action activateBoss; 251 private Timer fireballTimer; 249 252 250 253 public override void Begin() … … 419 422 bossHitAnimation = LoadAnimation("bosshit"); 420 423 bossHurtAnimation = LoadAnimation("bosshurt"); 424 fireballAnimation = LoadAnimation("fireball"); 421 425 422 426 cameraOffset = Window.Width / 4; … … 511 515 level.Execute(TILE_SIZE, TILE_SIZE); 512 516 513 // Kolmanteen kenttään laavaseinä .517 // Kolmanteen kenttään laavaseinä ja tulipalloja 514 518 if (levelNumber == 2) 515 519 { … … 532 536 }; 533 537 updateTimer.Start(); 538 539 fireballTimer = new Timer { Interval = 10.0 }; 540 fireballTimer.Timeout += delegate 541 { 542 var fireball = PhysicsObject.CreateStaticObject(100, 40); 543 fireball.IgnoresCollisionResponse = true; 544 fireball.Animation = new Animation(fireballAnimation); 545 fireball.Animation.Start(); 546 fireball.Y = RandomGen.SelectOne<HillBilly>(players).Position.Y; 547 fireball.X = Camera.X + Window.Width / 2.0; 548 fireball.Velocity = new Vector(-100, 0); 549 fireball.LifetimeLeft = TimeSpan.FromSeconds(20); 550 fireball.Tag = "burn"; 551 Add(fireball); 552 }; 553 fireballTimer.Start(); 534 554 } 535 555 } … … 1414 1434 if (cameraTarget.X == rightCamLimit && activateBoss != null) 1415 1435 { 1436 fireballTimer.Stop(); 1416 1437 activateBoss(); 1417 1438 activateBoss = null;
Note: See TracChangeset
for help on using the changeset viewer.