Exemplo n.º 1
0
        void ContextCallback(object obj)
        {
            switch (obj.ToString())
            {
            case "0":
                EncounterCreateNodePopupWindow.InitNodePopup();
                break;

            case "load":
                EncounterNodeEditorWindow.LoadGraph();
                break;

            case "unload":
                EncounterNodeEditorWindow.UnloadGraph();
                break;

            case "text node":
                EncounterNodeEditorWindow.getInstance().CreateNode(NodeType.Text, mousePos);
                break;

            case "dialog node":
                EncounterNodeEditorWindow.getInstance().CreateNode(NodeType.Dialog, mousePos);
                break;

            case "branching node":
                EncounterNodeEditorWindow.getInstance().CreateNode(NodeType.Branching, mousePos);
                break;

            case "end node":
                EncounterNodeEditorWindow.getInstance().CreateNode(NodeType.End, mousePos);
                break;

            case "delete":
                EncounterNodeEditorWindow.getInstance().DeleteNode(deleteNodeID);
                break;

            default:

                break;
            }
        }
 public static void InitNodePopup()
 {
     curPopup = (EncounterCreateNodePopupWindow)EditorWindow.GetWindow <EncounterCreateNodePopupWindow> ();
     curPopup.titleContent.text = "Encounter Create Node Popup Window";
 }