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; } }
public Wall(WallSideType wallsidetype, WallActionType walltype, int roomwidth, int roomheight, int wallthickness) { WallActionType = walltype; WallSideType = wallsidetype; Thickness = wallthickness; SetWallLength(wallsidetype, roomwidth, roomheight); SetWidthAndHeight(wallsidetype); SetOrientation(wallsidetype); SetPosition(wallsidetype, roomwidth, roomheight); }
public Wall(WallSideType wallsidetype, WallActionType walltype,int roomwidth, int roomheight, int wallthickness) { WallActionType = walltype; WallSideType = wallsidetype; Thickness = wallthickness; SetWallLength(wallsidetype, roomwidth, roomheight); SetWidthAndHeight(wallsidetype); SetOrientation(wallsidetype); SetPosition(wallsidetype, roomwidth, roomheight); }