protected override void Update(int t)
        {
            if (t < _startup)
            {
                P = _p0 + t * _v;
            }

            if (t >= _startup)
            {
                P = _p0 + _v * _startup;
            }

            if (t == _delay)
            {
                MainColor   = Color.Red;
                BorderColor = Color.Red;
            }
            if (t >= _delay)
            {
                P = _p0 + (t - _delay + _startup) * _v;
            }

            if (t > 30 && !Geom.CircleOverBox(new Circle(P, R + 2), World.Box))
            {
                Despawn();
            }
        }
Exemple #2
0
        protected override void Update(int t)
        {
            if (t > 30 && !Geom.CircleOverBox(new Circle(P, 10 + 2), World.Box))
            {
                Despawn();
            }
            if (t < 60)
            {
                P = _p + _v * t;
            }
            if (t % 120 == 0)
            {
                _random = _.Random.Float(0, 2 * Mathf.PI);
            }
            if (t % 120 < 60 && t % _.Difficulty.Choose(30, 20, 15, 10) == 0)
            {
                Shoot();
            }

            if (t == 479)
            {
                _v = _v * -1;
            }
            if (t > 480)
            {
                P = _p + _v * (t - 540);
            }
        }
 public override void Update(int t)
 {
     _p = _p0 + t * _v;
     if (!Geom.CircleOverBox(new Circle(_p, 120), World.Box))
     {
         Despawn();
     }
 }
 protected override void Update(int t)
 {
     P = _p0 + t * V;
     if (t > 30 && !Geom.CircleOverBox(new Circle(P, R + 2), World.Box))
     {
         Despawn();
     }
 }
Exemple #5
0
 protected override void Update(int t)
 {
     _p = _p0 + t * _v;
     if (t > 30 && !Geom.CircleOverBox(new Circle(_p, 6), World.Box))
     {
         Despawn();
     }
 }
Exemple #6
0
 public override void Update(int t)
 {
     The.World.Spawn(new Smoke(_p, _smokeColor, The.Random.Float(5, 10)));
     _p = _p0 + t * _v;
     if (!Geom.CircleOverBox(new Circle(_p, 8), World.Box))
     {
         Despawn();
     }
 }
 public override void Update(int t)
 {
     _p = _p0 + t * _v;
     if (_rank > 1 && t == 30)
     {
         Split();
     }
     else if (_rank == 1 && !Geom.CircleOverBox(new Circle(_p, 6), World.Box))
     {
         Despawn();
     }
 }
 public override void Update(int t)
 {
     _p = _p0 + t * _v;
     if (!Geom.CircleOverBox(new Circle(_p, 6), World.Box))
     {
         Despawn();
     }
     if (t >= _duration)
     {
         Despawn();
     }
 }
        protected override void Update(int t)
        {
            if (t < _t)
            {
                P = _p + _v * t;
            }
            if (t == _t)
            {
                _p = new XY(P.X, P.Y + 100);
                P  = new XY(_p.X, _p.Y - 100);
            }
            if (t > _t)
            {
                P = new XY(
                    _p.X + 100 * Mathf.Cos(-Mathf.PI / 2 - (t - _t) * Mathf.PI / _spindelay) * _side,
                    _p.Y + 100 * Mathf.Sin(-Mathf.PI / 2 - (t - _t) * Mathf.PI / _spindelay * _side)
                    );
            }

            if (t == _t + _spindelay)
            {
                _p = new XY(P.X, P.Y);
                P  = _p;
            }
            if (t > _t + _spindelay)
            {
                P = _p - _v * (t - _t - _spindelay);
            }

            if (_shoot && t % _.Difficulty.Choose(120, 60, 45, 45) == 0)
            {
                _.World.Spawn(
                    new LinearPetalBullet(
                        P,
                        _.Difficulty.Choose(2f, 2f, 3f, 4f) * new XY(XY.DirectionAngle(P, _.Player.Position)),
                        Color.Red,
                        Color.Orange,
                        3f
                        )
                    );
            }

            if (_shoot == false && _.Difficulty >= Difficulty.Hard &&
                t % _.Difficulty.Choose(9999, 9999, 180, 120) == 0)
            {
                AlternateShoot(t);
            }
            if (t > 30 && !Geom.CircleOverBox(new Circle(P, 10 + 2), World.Box))
            {
                Despawn();
            }
        }
 protected override void Update(int t)
 {
     if (t > 30 && !Geom.CircleOverBox(new Circle(P, 10 + 2), World.Box))
     {
         Despawn();
     }
     P = _p + _v * t;
     if (_shoot && P.X - _.Player.Position.X < 20 && P.X - _.Player.Position.X > -20)
     {
         Shoot(t);
         _shoot = false;
     }
 }
Exemple #11
0
        protected override void Update(int t)
        {
            if (t <= _t)
            {
                P = _p0 + Mathf.Sqrt(t) * _v1 * V;
            }
            else
            {
                P = _p0 + Mathf.Sqrt(_t) * _v1 * V + (t - _t) * _v2 * V;
            }

            if (t > 30 && !Geom.CircleOverBox(new Circle(P, R + 2), World.Box))
            {
                Despawn();
            }
        }
 protected override void Update(int t)
 {
     P = _p + V * t;
     if (t % 3 == 0)
     {
         _.World.Spawn(new Blast
                       (
                           P + P.Rotated90CW().Normalized *_.Random.Float(-6, 6),
                           _.Random.Float(2, 9),
                           15));
     }
     if (t > 30 && !Geom.CircleOverBox(new Circle(P, 2), World.Box))
     {
         Despawn();
     }
 }
Exemple #13
0
 protected override void Update(int t)
 {
     P = P + _v * (1 + A * t);
     if (XY.Distance(P, _p) < XY.Distance(_.Player.Position, _p))
     {
         _v = new XY((_.Player.Position - _p).Angle);
     }
     if (t % 3 == 0)
     {
         _.World.Spawn(new Blast
                       (
                           P + P.Rotated90CW().Normalized *_.Random.Float(-35, 35),
                           _.Random.Float(3, 10),
                           120));
     }
     if (t > 30 && !Geom.CircleOverBox(new Circle(P, 1), World.Box))
     {
         Despawn();
     }
 }
Exemple #14
0
        protected override void Update(int t)
        {
            if (t < _startup)
            {
                P = _p0 + t * V;
            }

            if (t >= _startup)
            {
                P = _p0 + V * _startup;
            }

            if (t >= _delay)
            {
                P = _p0 + (t - _delay + _startup) * V;
            }
            if (t > 30 && !Geom.CircleOverBox(new Circle(P, R + 2), World.Box))
            {
                Despawn();
            }
        }
Exemple #15
0
        protected override void Update(int t)
        {
            if (t > 30 && !Geom.CircleOverBox(new Circle(P, 10 + 2), World.Box))
            {
                Despawn();
            }
            if (t < 60)
            {
                P = _p + _v * t;
            }
            if (t % 120 == 0)
            {
                Shoot();
            }

            if (t == 479)
            {
                _v = _v * -1;
            }
            if (t > 480)
            {
                P = _p + _v * (t - 540);
            }
        }