Ejemplo n.º 1
0
        /// <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();
            }
        }
Ejemplo n.º 2
0
 /// <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;
 }
Ejemplo n.º 3
0
 /// <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)
 {
 }
Ejemplo n.º 4
0
 public override void Teleport(BlackHole blackhole, Vector2 destination, Vector2 exitVelocity)
 {
     if (ai != null) ai.Teleport(blackhole, destination);
     base.Teleport(blackhole, destination, exitVelocity);
 }
Ejemplo n.º 5
0
 public override void Teleport(BlackHole blackhole, Vector2 destination, Vector2 exitVelocity)
 {
     if (IsTractored && !m_fling) return;
     base.Teleport(blackhole, destination, exitVelocity);
 }