Beispiel #1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        cAmStar myScript = (cAmStar)target;

        if (GUILayout.Button("Random start/target"))
        {
            myScript.RandomlyPositionStartAndTarget();
        }
        if (GUILayout.Button("Find path"))
        {
            myScript.ClearMap();
            myScript.FindPath();
        }
    }
Beispiel #2
0
 // Start is called before the first frame update
 void Start()
 {
     // TODO: HACK probably should be a singleton or something
     map   = FindObjectOfType <Map>();
     AStar = FindObjectOfType <cAmStar>();
 }