public ConversationEditorWindow GetConversationEditor(int conversationIndex, bool createIfNotExists) { GameRources.GetInstance().selectedConversationIndex = conversationIndex; if (conversationIndex < 0 || conversationIndex >= Controller.Instance.ChapterList.getSelectedChapterDataControl() .getConversationsList() .getConversations().Count) { return(null); } var conversation = Controller .Instance.ChapterList.getSelectedChapterDataControl() .getConversationsList() .getConversations()[conversationIndex]; if (conversationWindows.ContainsKey(conversation) && conversationWindows[conversation] == null) { conversationWindows.Remove(conversation); } if (!conversationWindows.ContainsKey(conversation) && createIfNotExists) { ConversationEditorWindow convEditor = EditorWindow.GetWindow <ConversationEditorWindow>(); convEditor.Init(conversation); conversationWindows.Add(conversation, convEditor); } return(conversationWindows.ContainsKey(conversation) ? conversationWindows[conversation] : null); }
public void setParent(ConversationEditorWindow parent) { this.parent = parent; }