コード例 #1
0
ファイル: Border.cs プロジェクト: Menedyl/InfinityGame
    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;
            }
        }
    }
コード例 #2
0
ファイル: Player.cs プロジェクト: Menedyl/InfinityGame
 private void Awake()
 {
     _moveControllerBorder = GetComponent <MoveControllerBorder>();
 }