コード例 #1
0
 // Restricts the dimensions of the AutoTile placement to the vertical axis.
 private void PlaceAutoTilesVertical(EditorRoomScene scene, short top, short bottom, short xLevel)
 {
     for (short y = top; y <= bottom; y++)
     {
         byte subType = this.GetSubTypeAtPosition(xLevel, y);
         scene.PlaceTile(scene.levelContent.data.rooms[scene.roomID].main, LayerEnum.main, xLevel, y, this.tileId, subType, null);
     }
 }
コード例 #2
0
 // Restricts the dimensions of the AutoTile placement to the horizontal axis.
 private void PlaceAutoTilesHorizontal(EditorRoomScene scene, short left, short right, short yLevel)
 {
     for (short x = left; x <= right; x++)
     {
         byte subType = this.GetSubTypeAtPosition(x, yLevel);
         scene.PlaceTile(scene.levelContent.data.rooms[scene.roomID].main, LayerEnum.main, x, yLevel, this.tileId, subType, null);
     }
 }
コード例 #3
0
 // Places a full X+Y grid.
 private void PlaceAutoTilesFull(EditorRoomScene scene, short left, short right, short top, short bottom)
 {
     for (short x = left; x <= right; x++)
     {
         for (short y = top; y <= bottom; y++)
         {
             byte subType = this.GetSubTypeAtPosition(x, y);
             scene.PlaceTile(scene.levelContent.data.rooms[scene.roomID].main, LayerEnum.main, x, y, this.tileId, subType, null);
         }
     }
 }
コード例 #4
0
        // Special Ledge Placement (full axis movement). Top section will use Ledge, rest will use LedgeDecor.
        private void PlaceAutoTilesLedge(EditorRoomScene scene, short left, short right, short top, short bottom)
        {
            byte ledgeTool = this.tileId;
            byte decorTool = (byte)TileEnum.LedgeDecor;

            // Place Top of Ledge
            for (short x = left; x <= right; x++)
            {
                byte subType = this.GetSubTypeAtPosition(x, top);
                scene.PlaceTile(scene.levelContent.data.rooms[scene.roomID].main, LayerEnum.main, x, top, ledgeTool, subType, null);
            }

            // Place Rest of Ledge (Decor)
            top += 1;
            for (short x = left; x <= right; x++)
            {
                for (short y = top; y <= bottom; y++)
                {
                    byte subType = this.GetSubTypeAtPosition(x, y);
                    scene.PlaceTile(scene.levelContent.data.rooms[scene.roomID].bg, LayerEnum.bg, x, y, decorTool, subType, null);
                }
            }
        }