Beispiel #1
0
        protected override void showGUI()
        {
            showAnalyseTilset();
            if (linker.tilesets.Count > 0)
            {
                CustomEditorBase.Separator();
                showTilesetSelector();
                if (selectedTileset != null)
                {
                    scroolPos = EditorGUILayout.BeginScrollView(scroolPos);
                    showTileset();
                    EditorGUILayout.EndScrollView();

                    if (selectedTile != null)
                    {
                        CustomEditorBase.Separator();
                        showTile();
                    }
                }
            }
            else
            {
                RickEditorGUI.Label("", "No Tileset Loaded :(");
            }
        }
Beispiel #2
0
		void showMapFiles() {
			CustomEditorBase.Separator();
			RickEditorGUI.Label("INPUT :", selectedPath);
			GUILayout.Space(4);
			if(selectAllToglle){
				selectAllToglle = RickEditorGUI.Toggle("Select all",true);
				if(!selectAllToglle){
					for (int i = 0; i < selectedFiles.Length; i++) {
						selectedFiles[i] = false;
					}
				}
			}else{
				selectAllToglle = RickEditorGUI.Toggle("Select all",false);
				if(selectAllToglle){
					for (int i = 0; i < selectedFiles.Length; i++) {
						selectedFiles[i] = true;
					}
				}
			}
			GUILayout.Space(8);
			int index = 0;
			foreach (FileInfo fileInfo in files) {
				if(fileInfo.Exists){
					selectedFiles[index] = RickEditorGUI.Toggle(fileInfo.Name, selectedFiles[index]);
				}
				index++;
			}	
		}
Beispiel #3
0
        void showTile()
        {
            RickEditorGUI.Label("Tile id", selectedTile.id + "");

            GUI.changed         = false;
            selectedTile.prefab = (GameObject)RickEditorGUI.ObjectField("Prefab", selectedTile.prefab, typeof(GameObject), false);
            dataChanged        |= GUI.changed;
        }
Beispiel #4
0
        void showInformationSection()
        {
            if (selectedFiles == null)
            {
                return;
            }

            RickEditorGUI.Label("Number of files", selectedFiles.Length + "");
        }
Beispiel #5
0
        void showTile()
        {
            RickEditorGUI.Label("Tile id", selectedTile.id + "");

            GameObject beforeGameObject = selectedTile.prefab;

            GUI.changed         = false;
            selectedTile.prefab = (GameObject)RickEditorGUI.ObjectField("Prefab", selectedTile.prefab, typeof(GameObject), false);

            dataChanged |= GUI.changed || (beforeGameObject == null && selectedTile.prefab != null) || (beforeGameObject != selectedTile.prefab);
        }
Beispiel #6
0
		void showOutputPanel() {
			CustomEditorBase.Separator();
			RickEditorGUI.Label("Output","");
			GUILayout.Space(4);
			
			const string seprateTooltip = "Determine whether the Tiles are loaded in Parent GameObjects based on the Tile's Layer or all tiles are put in the same parent.";
			separatePrefabByTiledLayers = RickEditorGUI.Toggle("Use Layers", seprateTooltip, separatePrefabByTiledLayers);
			loadToPrefab = RickEditorGUI.Toggle("Load As Prefab", loadToPrefab);
			if (loadToPrefab) {
				prefabFolder = RickEditorGUI.FolderPath("Asset Prefab Folder", prefabFolder, RickEditorGUI.assetFolder);
			}
			
			showButton();
		}
Beispiel #7
0
 void showInputSection()
 {
     RickEditorGUI.Label("Input", "");
     RickEditorGUI.Label("", "Modes placeHolder");
     GUI.changed                   = false;
     currentAutotile.center        = showInputLine("Center", previewTextures[TILE_CENTER], currentAutotile.center);
     currentAutotile.cornerOutside = showInputLine("Outside Corner", previewTextures[TILE_CORNER_OUTSIDE], currentAutotile.cornerOutside);
     currentAutotile.side          = showInputLine("Side", previewTextures[TILE_STRAIGHT], currentAutotile.side);
     currentAutotile.cornerInside  = showInputLine("Inside Corner", previewTextures[TILE_CORNER_INSIDE], currentAutotile.cornerInside);
     if (GUI.changed)
     {
         dataChanged = true;
         shower.loadTextures();
     }
     if (GUILayout.Button("Autoload Based on Center"))
     {
         autoLoadBasedOnCenter();
     }
 }
Beispiel #8
0
        void showOutputSection()
        {
            RickEditorGUI.Label("Output-Tiled AutoTiles", "");
            currentAutotile.tilesFileName = EditorGUILayout.TextField("TilesetName.tmx", currentAutotile.tilesFileName);
            if (GUILayout.Button("Export"))
            {
                currentAutotile.autoTileFilePath = EditorUtility.SaveFilePanel("Autotile file", RickEditorGUI.rootFolder, "autotile", "tmx");
                //currentAutotile.autoTileFilePath = "C:/Users/The User/Documents/Unity Games/jeux/ITT1_EndlessTowerClimber/autotile.tmx";
                export();
            }

            CustomEditorBase.Separator();
            RickEditorGUI.Label("Output-Create Prefab", "");
            currentAutotile.basePrefab        = (GameObject)EditorGUILayout.ObjectField("Base prefab", currentAutotile.basePrefab, typeof(GameObject), false);
            currentAutotile.outputAssetFolder = RickEditorGUI.FolderPath("Destination folder", currentAutotile.outputAssetFolder, RickEditorGUI.assetFolder);
            if (GUILayout.Button("Make Copies"))
            {
                makeCopie();
            }
        }
Beispiel #9
0
 protected override void showGUI()
 {
     showAnalyseTilset();
     if (linker.tilesets.Count > 0)
     {
         CustomEditorBase.Separator();
         showTilesetSelector();
         if (selectedTileset != null)
         {
             showTileset();
             if (selectedTile != null)
             {
                 CustomEditorBase.Separator();
                 showTile();
             }
         }
     }
     else
     {
         RickEditorGUI.Label("", "No Tileset Loaded :(");
     }
 }
Beispiel #10
0
        void showPreviewSection()
        {
            RickEditorGUI.Label("Preview", "");

            shower.show();
        }