Beispiel #1
0
    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;
            }
        }
    }
Beispiel #2
0
 private void Awake()
 {
     _moveControllerBorder = GetComponent <MoveControllerBorder>();
 }