示例#1
0
            public override bool doTool()
            {
                if (subTools == null)
                {
                    return(false);
                }

                if (isRoot)
                {
                    var conversation = content.getConversation();
                    conversation.setRootNode(newNode.getContent() as ConversationNode);
                }

                return(subTools.All(t => t.doTool()));
            }
示例#2
0
        protected override void DrawInspector()
        {
            EditorWindowBase.WantsMouseMove = true;
            base.DrawInspector();
            var prevWorkingConversation = workingConversation;

            workingConversation = Controller.Instance.ChapterList.getSelectedChapterDataControl()
                                  .getConversationsList().getConversations()[GameRources.GetInstance().selectedConversationIndex];
            if (workingConversation != null && prevWorkingConversation != workingConversation)
            {
                conversationEditor = ConversationEditor.CreateInstance <ConversationEditor>();
                conversationEditor.BeginWindows = () => BeginWindows();
                conversationEditor.EndWindows   = () => EndWindows();
                conversationEditor.Repaint      = () => Repaint();
                conversationEditor.Init(workingConversation);
            }

            EditorGUI.BeginChangeCheck();
            var newId = EditorGUILayout.TextField(TC.get("Conversation.Title"), workingConversation.getId());

            if (EditorGUI.EndChangeCheck())
            {
                workingConversation.getConversation().setId(newId);
            }
        }