private void TogglePosBorder(MoveControllerBorder moveControllerBorder) { foreach (Direction dir in _directions) { switch (dir) { case Direction.North: moveControllerBorder.IsPosBorderNorth = !moveControllerBorder.IsPosBorderNorth; break; case Direction.East: moveControllerBorder.IsPosBorderEast = !moveControllerBorder.IsPosBorderEast; break; case Direction.South: moveControllerBorder.IsPosBorderSouth = !moveControllerBorder.IsPosBorderSouth; break; case Direction.West: moveControllerBorder.IsPosBorderWest = !moveControllerBorder.IsPosBorderWest; break; } } }
private void Awake() { _moveControllerBorder = GetComponent <MoveControllerBorder>(); }