Exemple #1
0
    private void OnTriggerExit2D(Collider2D collision)
    {
        ShipMovement mov = collision.GetComponent <ShipMovement>();

        if (mov != null)
        {
            ships.Remove(mov);
            if (mov.tag == tag)
            {
                mov.EndSlowEffect(-data.MoveSpeedupAmount, -data.TurnSpeedupAmount);
            }
            else
            {
                mov.EndSlowEffect(data.MoveSlowAmount, data.TurnSlowAmount);
            }
        }
    }