Exemplo n.º 1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        PCGAlgorithm myScript = (PCGAlgorithm)target;

        EditorGUILayout.Space();
        if (GUILayout.Button("Generate Cave"))
        {
            myScript.GenerateCave();
        }
        EditorGUILayout.Space();
        if (GUILayout.Button("Clear Cave"))
        {
            myScript.ClearCave();
        }
    }
Exemplo n.º 2
0
 private void Start()
 {
     algorithm = GetComponent <PCGAlgorithm>();
     StartCoroutine(GenerateCaves());
 }