Example #1
0
        public override void Update()
        {
            if (disabled)
            {
                return;
            }

            drag = capacity / normalCapacity;

            CollectResources();
            UpdateProjectiles();

            collectorAnim.Update(position);
            portalAnim.Update(position);
            poofAnim.Update(position);
            explodeAnim.Update(position);

            if (collected >= capacity)
            {
                Burst(true);
            }

            if (heartbeatSchedule.IsOn())
            {
                SendHeartbeat();
            }

            if (scale < targetScale)
            {
                scale += scaleRate;
            }

            if (!isDying && collectorAnim.sheet == (int)States.Static)
            {
                if (health <= 40)
                {
                    damage = 2;
                }
                else if (health <= 80)
                {
                    damage = 1;
                }
                else
                {
                    damage = 0;
                }
                collectorAnim.SetFrame(damage);
                base.Update();
            }
        }
Example #2
0
        public override void Update()
        {
            if (inward)
            {
                GridManager.Pinch(position, 150, 0.005f, display);
            }
            else
            {
                GridManager.Bloat(position, 150, 0.005f, display);
            }

            wormholeAnim.Update(position);

            base.Update();
        }