示例#1
0
    public virtual void OnTriggerExit2D(Collider2D collision)
    {
        Debug.Log(collision.gameObject.name + exitMessage);
        IFieldAffected fieldAffected = collision.GetComponent <IFieldAffected>();

        if (fieldAffected != null)
        {
            fieldAffected.OnFieldExit(this);
        }
    }
示例#2
0
    public override void OnTriggerExit2D(Collider2D collision)
    {
        Debug.Log(collision.gameObject.name + exitMessage);
        IFieldAffected fieldAffected = collision.GetComponent <IFieldAffected>();
        IDamageable    damageable    = collision.GetComponent <IDamageable>();

        if (fieldAffected != null && damageable != null)
        {
            fieldAffected.OnFieldExit(this);
        }
    }
示例#3
0
    public override void OnTriggerExit2D(Collider2D collision)
    {
        Debug.Log(collision.gameObject.name + exitMessage);
        IFieldAffected fieldAffected = collision.GetComponent <IFieldAffected>();
        MovementModel  movementModel = collision.GetComponent <MovementModel>();

        if (fieldAffected != null && movementModel != null)
        {
            fieldAffected.OnFieldExit(this);
            movementModel.ResetGravity();
        }
    }