示例#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;
     }
 }