コード例 #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();
        }
    }
コード例 #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>();
 }