public void OnTriggerExit2D(Collider2D col) { BasicMovementController2D character = col.GetComponent <BasicMovementController2D>(); if (character) { character.LadderAreaExit(); if (HasRestrictedArea) { character.ClearLadderRestrictedArea(); } } }
public void OnTriggerStay2D(Collider2D col) { BasicMovementController2D character = col.GetComponent <BasicMovementController2D>(); if (character) { //if (Collider.bounds.Contains(character.MotorCollider.bounds.center)) character.LadderAreaEnter(AreaBounds, TopAreaHeight, BottomAreaHeight); if (HasRestrictedArea) { character.SetLadderRestrictedArea(RestrictedAreaBounds, IsRestrictedAreaTopIgnored); } else { character.ClearLadderRestrictedArea(); } } }