protected override void Update(int t) { var player = _.Player; if (player != null && !player.Despawned) { if (_pp0.IsNaN) { _pp0 = player.Position; } _pp1 = player.Position; } if (t >= _t1) { if (!_pp1.IsNaN) { _.World.Spawn( new LinearPetalBullet( _p1, (_pp1 + _pp1 - _pp0 - _p1).WithLength(3), Color.Yellow, Color.Orange, 5 ) ); } Despawn(); } P = XY.Lerp(_p1, _p0, Mathf.Pow(0.5f, t / _t05)); }
public override void Update(int t) { The.World.Spawn(new Smoke(_p - new XY(_rotation) * 5, _smokeColor, The.Random.Float(5, 10))); // _p = _p0 + t * _v; _p = XY.Lerp(_p0, _target, t / (float)_tExplosion); if (t >= _tExplosion) { Explode(); } }
public override void Update(int t) { if (t % 180 == 0) { if (The.Difficulty >= Difficulty.Lunatic) { FireEpicSalvo(The.Player.Position); } else { FireSalvo(The.Player.Position); } if (The.Difficulty >= Difficulty.Normal) { FireRocket(XY.Lerp(_p, The.Player.Position, -0.5f)); } return; } if (t % 60 == 0 && The.Difficulty >= Difficulty.Hard) { FireRocket(The.Player.Position); } }