예제 #1
0
    // Thank you Brackeys: https://www.youtube.com/watch?v=RInUu1_8aGw
	public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        Tiles tiles = (Tiles) target;

                
        if (GUILayout.Button("Update all hexagons"))
        {
            tiles.CollectTiles(true);
            UpdateNames(tiles.GetPlatforms());
        }

        if (GUILayout.Button("Enhance hexagon clicking experience (for old scenes)"))
        {
            tiles.CollectTiles(true);
            AddScriptToAllHexagonChildren(tiles.GetPlatforms());
        }


        // if (GUILayout.Button("Print pathTiles"))
        // {            
        //     tiles.PrintPathTiles(); // Just for testing purposes
        // }

    }
예제 #2
0
    // Thank you Brackeys: https://www.youtube.com/watch?v=RInUu1_8aGw
	public override void OnInspectorGUI()
    {
        Platform platform = (Platform) target;
        Tiles tiles = GameObject.Find("Map/Tiles").GetComponent<Tiles>();

        base.OnInspectorGUI();        

        GUILayout.Label("");
        GUILayout.Label("Any submited(!) change will take its value from above");
        GUILayout.Label("and set it to all tiles of that platfrom.");

        if (GUILayout.Button("Change Color"))
        {
            tiles.CollectTiles(true);
            platform.SetColor();
        }

        if (GUILayout.Button("Set to cracked tiles"))
        {
            tiles.CollectTiles(true);
            platform.SetCrackedPlatform();
        }

        if (GUILayout.Button("Set to path tiles"))
        {
            tiles.CollectTiles(true);
            platform.SetPathPlatform();
        }

        if (GUILayout.Button("Set to moving tiles"))
        {
            tiles.CollectTiles(true);
            platform.SetMovingPlatform();
        }        
        
        if (GUILayout.Button("Set to starting tiles"))
        {
            tiles.CollectTiles(true);
            platform.SetStartingPlatform();
        }

        if (GUILayout.Button("Set to winning tiles"))
        {
            tiles.CollectTiles(true);
            platform.SetWinningPlatform();
        }
        
        if (GUILayout.Button("Set to checkpoint tiles"))
        {
            tiles.CollectTiles(true);
            platform.SetCheckpointPlatform();
        }

        if (GUILayout.Button("Set to distraction tiles"))
        {
            tiles.CollectTiles(true);
            platform.SetDistractionPlatform();
        }

        if (GUILayout.Button("Set to special tiles"))
        {
            tiles.CollectTiles(true);
            platform.SetSpecialPlatform();
        }

        if (GUILayout.Button("Untag all tiles"))
        {
            tiles.CollectTiles(true);
            platform.UntagAllHexagons();
        }
        
        // if (GUILayout.Button("Delete Platform"))
        // {
        //     platform.DestroyPlatform(true);
        // }
    }
    // Thank you Brackeys: https://www.youtube.com/watch?v=RInUu1_8aGw
	public override void OnInspectorGUI()
    {
        TileColorsPermanent tileColors = (TileColorsPermanent) target;
        Tiles tiles = tileColors.GetComponent<Tiles>();
        base.OnInspectorGUI();


        if (GUILayout.Button("Change Color of CrackedTiles"))
        {
            tiles.CollectTiles(true);
            tileColors.ChangeCrackedTilesColor();
        }

        if (GUILayout.Button("Change Color of PathTiles"))
        {           
            tiles.CollectTiles(true);
            tileColors.ChangePathTilesColor();
        }

        if (GUILayout.Button("Change Color of DistractionTiles"))
        {            
            tiles.CollectTiles(true);
            tileColors.ChangeDistractionTilesColor();
        }

        if (GUILayout.Button("Change Color of CheckpointTiles"))
        {            
            tiles.CollectTiles(true);
            tileColors.ChangeCheckpointTilesColor();
        }

        if (GUILayout.Button("Change Color of SpecialTiles"))
        {            
            tiles.CollectTiles(true);
            tileColors.ChangeSpecialTilesColor();
        }

        if (GUILayout.Button("Change Color of MovingTiles"))
        {            
            tiles.CollectTiles(true);
            tileColors.ChangeMovingTilesColor();
        }
        
        if (GUILayout.Button("Change Color of StartingTiles"))
        {            
            tiles.CollectTiles(true);
            tileColors.ChangeStartingTilesColor();
        }

        if (GUILayout.Button("Change Color of WinningTiles"))
        {            
            tiles.CollectTiles(true);
            tileColors.ChangeWinningTilesColor();
        }

        if (GUILayout.Button("Change Color of standardTiles"))
        {            
            tiles.CollectTiles(true);
            tileColors.ChangeColorOfStandardTiles();
        }        
        
        if (GUILayout.Button("Change Color of every Tile"))
        {            
            tiles.CollectTiles(true);
            tileColors.ChangeColorOfAllTiles();
        }

    }