Beispiel #1
0
 protected void SetupAnimations()
 {
     wormholeAnim = new AnimSet(WormholeAnimations());
     if (inward)
     {
         wormholeAnim.Play((int)States.SuckIntro);
     }
     else
     {
         wormholeAnim.Play((int)States.BloatIntro);
     }
 }
Beispiel #2
0
 public void Collapse()
 {
     if (!dying)
     {
         dying = true;
         if (inward)
         {
             wormholeAnim.Play((int)States.SuckOutro);
         }
         else
         {
             wormholeAnim.Play((int)States.BloatOutro);
         }
     }
 }
Beispiel #3
0
        public void SetupAnimations()
        {
            collectorAnim             = new AnimSet(CollectorAnimations());
            collectorAnim.frameOffset = new Vector2(0, 135);
            collectorAnim.Play((int)States.Intro);


            Animation[] portalAnimations =
            {
                new Animation(0, 47, false)
            };

            portalAnim = new AnimSprite("collector_portal", new Point(570, 200), portalAnimations);
            portalAnim.frameOffset.Y += 620;
            portalAnim.Play(0);


            Animation[] poofAnimations =
            {
                new Animation(0, 30, false)
            };

            poofAnim         = new AnimSprite("collector_poof", new Point(200, 150), poofAnimations);
            poofAnim.playing = false;


            Animation[] explodeAnimations =
            {
                new Animation(0, 48, false)
            };

            explodeAnim                = new AnimSprite("collector_explosion_particles", new Point(500, 500), explodeAnimations);
            explodeAnim.playing        = false;
            explodeAnim.frameOffset.Y += 100;
        }
Beispiel #4
0
        public void ExplodeDie()
        {
            if (!isDying)
            {
                Die();

                explodeAnim.WhenFinished(() => {
                    TeamColour.Put(teamColour);
                    CollectorManager.Remove(this);
                });

                Audio.Play("collector.bass", 4);
                collectorAnim.Play((int)States.Exploding);
                collectorAnim.frameOffset = new Vector2(50, 137);
                explodeAnim.Play(0);
            }
        }