Exemple #1
0
 public static void ClearTempTool()
 {
     if (EditorTools.tempTool != null)
     {
         EditorTools.tempTool = null;
     }
 }
Exemple #2
0
        public static void SetTempTool(FuncTool tool)
        {
            EditorTools.tempTool = tool;
            EditorTools.autoTool.ClearAutoTiles();

            // Update Helper Text (if applicable)
            EditorTools.UpdateHelperText();
        }
Exemple #3
0
        public static void SetTileTool(TileTool tool, byte index = 0)
        {
            EditorTools.tileTool = tool;
            EditorTools.funcTool = null;
            EditorTools.tempTool = null;
            EditorTools.autoTool.ClearAutoTiles();

            EditorUI.currentSlotGroup = EditorTools.tileTool.slotGroup;

            // Assign Index and SubIndex to TileTool (if applicable)
            EditorTools.tileTool.SetIndex(index);

            // Update Helper Text (if applicable)
            EditorTools.UpdateHelperText();
        }
Exemple #4
0
        public static void StartAutoTool(short gridX, short gridY)
        {
            // Can only set an AutoTile tool if a TileTool is also active.
            if (EditorTools.tileTool == null)
            {
                return;
            }

            EditorPlaceholder ph = EditorTools.tileTool.CurrentPlaceholder;

            EditorTools.autoTool.StartAutoTile(ph.tileId, ph.subType, ph.layerEnum, gridX, gridY);

            // Only disable other tools if the AutoTile tool started.
            if (EditorTools.autoTool.IsActive)
            {
                EditorTools.funcTool = null;
                EditorTools.tempTool = null;
            }
        }