public override void InvokeOnTrapStay(Trappable trappable) { if (!(TriggerOnce && hasTrigger)) { isOnto = true; } }
public override void InvokeOnTrapExit(Trappable trappable) { if (!(TriggerOnce && hasTrigger)) { isOnto = false; } }
virtual public void OnTriggerExit2D(Collider2D collision) { Trappable trappable = collision.gameObject.GetComponent <Trappable>() as Trappable; if (trappable != null) { InvokeOnTrapExit(trappable); trappable.OnTrapExit(this.GetComponent <Trap>()); } }
virtual public void OnCollisionStay2D(Collision2D collision) { Trappable trappable = collision.gameObject.GetComponent <Trappable>() as Trappable; if (trappable != null) { InvokeOnTrapStay(trappable); trappable.OnTrapStay(this); } }
IEnumerator Trap_Cooldown(Trappable trappable) { trappable.On_Trap(); closed = true; anim.SetBool("closed", closed); yield return(new WaitForSeconds(5f)); if (trappable != null) { trappable.On_Untrap(); } anim.SetBool("closed", false); yield return(new WaitForSeconds(0.5f)); yield return(new WaitUntil(() => !shot_freeze)); closed = false; }
abstract public void InvokeOnTrapExit(Trappable trappable);
abstract public void InvokeOnTrapStay(Trappable trappable);
abstract public void InvokeOnTrapEnter(Trappable trappable);
public override void InvokeOnTrapStay(Trappable trappable) { }
public override void InvokeOnTrapExit(Trappable trappable) { }
public override void InvokeOnTrapEnter(Trappable trappable) { }