Пример #1
0
 public void ItemHandler(string path, bool selectedMode, ItemPress handler, bool headLess, int index)
 {
     if (selectedItem != handler)
     {
         if (selectedItem != null)
         {
             selectedItem.selected = false;
             selectedItem.curLocAC.selectIntractable(false);
             selectedItem          = handler;
             selectedItem.selected = true;
             selectedItem.curLocAC.selectIntractable(true);
             openBtn.gameObject.SetActive(true);
         }
         else
         {
             selectedItem          = handler;
             selectedItem.selected = true;
             openBtn.gameObject.SetActive(true);
         }
     }
     else
     {
         selectedItem.selected = false;
         selectedItem.curLocAC.selectIntractable(false);
         selectedItem = null;
         openBtn.gameObject.SetActive(false);
     }
 }
Пример #2
0
        public void CreateSpriteEditor(string path, bool selectedMode, ItemPress handler, bool headLess, int index)
        {
            BItemEditor SEditor = new BItemEditor();

            SEditor.TargetSprite = handler.itemTarget.index;
            WindowManager.CreateWindow(0, 0, SEditor, true);
        }
Пример #3
0
        public void CreateSpriteEditor(string path, bool selectedMode, ItemPress handler, bool headLess, int index)
        {
            BEntityEditor SEditor = new BEntityEditor();

            SEditor.isSubWindow  = true;
            SEditor.creationMode = false;
            SEditor.targetEntID  = index;
            WindowManager.CreateWindow(0, 0, SEditor, true);
        }
Пример #4
0
 public void ItemHandler(string path, bool selectedMode, ItemPress handler, bool headLess, int index)
 {
     if (headLess)
     {
         GlobalToolManager.globalToolManager.SetTool(new EditorToolTilePen());
         GlobalToolManager.SendToolUpdate();
         ScenePrimer.curEditorPrimer.curSpriteId   = newField.items[index].index;
         ScenePrimer.curEditorPrimer.curSpriteMode = true;
         ScenePrimer.curEditorPrimer.UpdateLayer(3);
         WindowTerminate();
         return;
     }
     if (selectedItem != handler)
     {
         if (selectedItem != null)
         {
             selectedItem.selected = false;
             selectedItem.curLocAC.selectIntractable(false);
             selectedItem          = handler;
             selectedItem.selected = true;
             selectedItem.curLocAC.selectIntractable(true);
             GlobalToolManager.globalToolManager.SetTool(new EditorToolTilePen());
             GlobalToolManager.SendToolUpdate();
             ScenePrimer.curEditorPrimer.curSpriteId   = selectedItem.itemTarget.index;
             ScenePrimer.curEditorPrimer.curSpriteMode = true;
             ScenePrimer.curEditorPrimer.UpdateLayer(3);
             WindowTerminate();
         }
         else
         {
             selectedItem          = handler;
             selectedItem.selected = true;
             selectedItem.curLocAC.selectIntractable(true);
             GlobalToolManager.globalToolManager.SetTool(new EditorToolTilePen());
             GlobalToolManager.SendToolUpdate();
             ScenePrimer.curEditorPrimer.curSpriteId   = selectedItem.itemTarget.index;
             ScenePrimer.curEditorPrimer.curSpriteMode = true;
             ScenePrimer.curEditorPrimer.UpdateLayer(3);
             WindowTerminate();
         }
     }
     else
     {
         selectedItem.selected = true;
         selectedItem.curLocAC.selectIntractable(true);
         ScenePrimer.curEditorPrimer.curSpriteId = selectedItem.itemTarget.index;
         ScenePrimer.curEditorPrimer.UpdateLayer(3);
         GlobalToolManager.SendToolUpdate();
     }
 }
Пример #5
0
 public void SelectItem(int targetItem)
 {
     if (items == null)
     {
         return;
     }
     if (targetItem <= items.Length)
     {
         if (items[targetItem].itemPressMethod != null)
         {
             ItemPress target = new ItemPress();
             items[targetItem].itemPressMethod("", true, null, true, items[targetItem].index);
         }
     }
 }
Пример #6
0
        public void AddFile(string filepath, bool mode, ItemPress handler)
        {
            if (singelFileMode)
            {
                if (importFiles == null)
                {
                    importFiles = new string[1];
                }
                if (mode)
                {
                    importFiles[0] = filepath;
                    return;
                }
                else
                {
                    importFiles[0] = "";
                    return;
                }
            }
            else
            {
                if (importFiles == null)
                {
                    importFiles = new string[0];
                }
            }

            for (int i = 0; i < importFiles.Length; i++)
            {
                if (filepath == importFiles[i])
                {
                    if (mode)
                    {
                        return;
                    }
                    else
                    {
                        importFiles[i] = "";
                        if (iFEmpty == null)
                        {
                            iFEmpty    = new int[1];
                            iFEmpty[0] = i;
                        }
                    }
                }
            }
        }
Пример #7
0
 public void ItemHandler(string path, bool selectedMode, ItemPress handler, bool headLess, int index)
 {
     if (headLess)
     {
         ScenePrimer.curEditorPrimer.curTileId     = newField.items[index].index;
         ScenePrimer.curEditorPrimer.curSpriteMode = false;
         WindowTerminate();
         return;
     }
     if (selectedItem != handler)
     {
         if (selectedItem != null)
         {
             selectedItem.selected = false;
             selectedItem.curLocAC.selectIntractable(false);
             selectedItem          = handler;
             selectedItem.selected = true;
             selectedItem.curLocAC.selectIntractable(true);
             ScenePrimer.curEditorPrimer.curTileId     = selectedItem.itemTarget.index;
             ScenePrimer.curEditorPrimer.curSpriteMode = false;
         }
         else
         {
             selectedItem          = handler;
             selectedItem.selected = true;
             selectedItem.curLocAC.selectIntractable(true);
             ScenePrimer.curEditorPrimer.curTileId     = selectedItem.itemTarget.index;
             ScenePrimer.curEditorPrimer.curSpriteMode = false;
         }
     }
     else
     {
         selectedItem.selected = true;
         selectedItem.curLocAC.selectIntractable(true);
     }
 }
Пример #8
0
 public void GoInsideFolder(string path, bool selectedMode, ItemPress handler, bool headLess, int index)
 {
     //Debug.Log(filepath);
     GenerateFeild(path);
 }