コード例 #1
0
        public void OnTriggerExit2D(Collider2D col)
        {
            BasicMovementController2D character = col.GetComponent <BasicMovementController2D>();

            if (character)
            {
                character.LadderAreaExit();
                if (HasRestrictedArea)
                {
                    character.ClearLadderRestrictedArea();
                }
            }
        }
コード例 #2
0
        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();
                }
            }
        }