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

        WM_Player P = (WM_Player)target;

        // SETBASE
        //Debug.Log("heresy " + FBase?.name);
        int size = CG.Graph.Count;

        string[] options = new string[size];
        if (FBase == null) // if new graph was created then lost previous base link, so give a new base
        {
            FBase      = CG.Graph[0];
            FBaseIndex = 0;
        }
        for (int i = 0; i < size; i++)
        {
            if (FBase.name == CG.Graph[i].name)
            {
                FBaseIndex = i;                                 // so that the popup shows the current base
            }
            options[i] = CG.Graph[i].name;
        }
        FBaseIndex = EditorGUILayout.Popup("Select Initial Base", FBaseIndex, options);
        FBase      = CG.Graph[FBaseIndex];
        if (GUILayout.Button("Set Base"))
        {
            P.SetInitialNode(FBase); // force the base initialisation if new graph
        }
    }
Ejemplo n.º 2
0
 private void OnMouseDown()
 {
     WM_Player.SetFutureNode(this);
 }
Ejemplo n.º 3
0
 private void OnMouseDown()
 {
     WM_Player.SetUnitToTalk(this);
 }