コード例 #1
0
 private void HandleWallAction(WallActionType wallactiontype, WallOrientationType wallorientationtype, IContainable currentind)
 {
     switch (wallactiontype)
     {
         case Walls.WallActionType.Bounce:
             if(wallorientationtype == WallOrientationType.Vertical)
             {
                 currentind.BounceXWall();
             }
             else
             {
                 currentind.BounceYWall();
             }
             break;
         case Walls.WallActionType.Portal:
             if(wallorientationtype == WallOrientationType.Vertical)
             {
                 currentind.TravelThroughXWall();
             }
             else
             {
                 currentind.TravelThroughYWall();
             }
             break;
     }
 }
コード例 #2
0
ファイル: Wall.cs プロジェクト: kbo4sho/Swarm
 private void SetOrientation(WallSideType wallsidetype)
 {
     switch (wallsidetype)
     {
         case Walls.WallSideType.Left:
             this.WallOrientationType = Walls.WallOrientationType.Vertical;
             break;
         case Walls.WallSideType.Top:
             this.WallOrientationType = Walls.WallOrientationType.Horizontal;
             break;
         case Walls.WallSideType.Right:
             this.WallOrientationType = Walls.WallOrientationType.Vertical;
             break;
         case Walls.WallSideType.Bottom:
             this.WallOrientationType = Walls.WallOrientationType.Horizontal;
             break;
     }
 }
コード例 #3
0
ファイル: Wall.cs プロジェクト: armangharib/Swarm
        private void SetOrientation(WallSideType wallsidetype)
        {
            switch (wallsidetype)
            {
            case Walls.WallSideType.Left:
                this.WallOrientationType = Walls.WallOrientationType.Vertical;
                break;

            case Walls.WallSideType.Top:
                this.WallOrientationType = Walls.WallOrientationType.Horizontal;
                break;

            case Walls.WallSideType.Right:
                this.WallOrientationType = Walls.WallOrientationType.Vertical;
                break;

            case Walls.WallSideType.Bottom:
                this.WallOrientationType = Walls.WallOrientationType.Horizontal;
                break;
            }
        }
コード例 #4
0
ファイル: Border.cs プロジェクト: kbo4sho/Swarm
 private void HandleWallAction(WallActionType wallactiontype, WallOrientationType wallorientationtype, IContainable currentind)
 {
     switch (wallactiontype)
     {
         case Walls.WallActionType.Bounce:
             if(wallorientationtype == WallOrientationType.Vertical)
             {
                 currentind.BounceXWall();
             }
             else
             {
                 currentind.BounceYWall();
             }
             break;
         case Walls.WallActionType.Portal:
             if(wallorientationtype == WallOrientationType.Vertical)
             {
                 currentind.TravelThroughXWall();
             }
             else
             {
                 currentind.TravelThroughYWall();
             }
             break;
     }
 }