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; } }
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; } }