Beispiel #1
0
    void ContextCallback(object obj)
    {
        string clb = obj.ToString();


        if (clb.Equals("conversationNode"))
        {
            GameObject            newGO = new GameObject();
            ConversationGenerator wo    = newGO.AddComponent <ConversationGenerator> ();
            wo.initialize();
            wo.reset();
            wo.addEvent();
            wo.addProgram();
            wo.registerEventName("none");              // to be altered later

            ObjectNode objectNode = ScriptableObject.CreateInstance <ObjectNode> ();
            objectNode.initialize();

            objectNode.currentFolder = currentFolder;
            objectNode.windowTitle   = "New Conversation";
            objectNode.windowRect    = new Rect(mousePos.x, mousePos.y, 200, 240);
            objectNode.theObject     = newGO;
            objectNode.theWO         = wo;

            objectNode.theWO.isRoot = true;

            windows.Add(objectNode);
        }
    }