Ejemplo n.º 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;
     }
 }
Ejemplo n.º 2
0
 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;
     }
 }
Ejemplo n.º 3
0
        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;
            }
        }
Ejemplo n.º 4
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;
     }
 }