/// <summary> /// Teleport entity through a blackhole. /// </summary> /// <param name="position"></param> /// <param name="exitVelocity"></param> public virtual void Teleport(BlackHole blackhole, Vector2 destination, Vector2 exitVelocity) { if (AllowTeleport) { if (TimeSinceTeleport > 0.75f) { // Play sound, unless it is a bullet in which case it just gets annoying. if (!(this is Bullet)) Sound.PlayCue("thru_black_hole", blackhole); Position = destination; TimeSinceTeleport = 0.0f; TeleportInertiaDir = exitVelocity; } } else if (this is TakesDamage) { ((TakesDamage) this).InstaKill(); } }
/// <summary> /// Ship was just teleported through a blackhole. /// </summary> /// <param name="blackhole">Start blackhole.</param> /// <param name="destination">Position of destination.</param> public void Teleport(BlackHole blackhole, Vector2 destination) { m_justTeleported = true; }
/// <summary> /// Ship was just teleported through a blackhole. /// </summary> /// <param name="blackhole">Start blackhole.</param> /// <param name="destination">Position of destination.</param> public void Teleport(BlackHole blackhole, Vector2 destination) { }
public override void Teleport(BlackHole blackhole, Vector2 destination, Vector2 exitVelocity) { if (ai != null) ai.Teleport(blackhole, destination); base.Teleport(blackhole, destination, exitVelocity); }
public override void Teleport(BlackHole blackhole, Vector2 destination, Vector2 exitVelocity) { if (IsTractored && !m_fling) return; base.Teleport(blackhole, destination, exitVelocity); }