public void AddFriend(int id) { XMLSaver.saveData.instanceID.Add(GetPairID(curUserId, id)); ChatInstanceData data = new ChatInstanceData(); data.lastChatTimeStamp = GameManager.Instance.time; XMLSaver.saveData.instanceData.Add(data); OnFriendsLstChange(); }
// public void AddFriend(string name) { pairId2Instance.Add(GetPairID(curName, name), new ChatInstance()); XMLSaver.saveData.instanceID.Add(GetPairID(curName, name)); ChatInstanceData data = new ChatInstanceData(); data.curNodeId = 0; data.curSectionId = 0; data.lastChatTimeStamp = GameManager.Instance.time; XMLSaver.saveData.instanceData.Add(data); OnExit(); OnEnter(curName); }
public void OnInit(int friendId) { ChatManager.Instance.curExecuteInstance = this; int pairId = ChatManager.Instance.GetPairID(curUserId, friendId); this.friendId = friendId; this.friendData = XMLSaver.saveData.GetAccountData(friendId); this.friendName = friendData.enname; curPairID = pairId; saveData = XMLSaver.saveData.GetInstanceData(curPairID); lastChatTimeStamp = saveData.lastChatTimeStamp; curSection = ChatManager.Instance.LoadSectionByID(curPairID, saveData.curSectionId); Node front = null; if (saveData.curNodeId >= 0) { curRunningNode = curSection.nodes[saveData.curNodeId]; front = curRunningNode.GetFront(); } else if (saveData.curNodeId == ChatManager.finished) { front = curSection.GetLast(); } else if (saveData.curNodeId == ChatManager.need2Init) { nextReadNode = curRunningNode = curSection.GetFirst(); saveData.curNodeId = curRunningNode.nodeId; saveData.readNodeId = nextReadNode.nodeId; } if (saveData.readNodeId >= 0) { nextReadNode = ChatManager.Instance.LoadSectionByID(curPairID, saveData.readSectionId).nodes [saveData.readNodeId]; } else { //nextReadNode = ChatManager.Instance.LoadSectionByID (curPairID, saveData.curSectionId).GetLast (); } if (front != null) { lastSentence = GetLastSentence(front); } totalRectHeight = saveData.totalRectHeight; }
public void OnInit(string name, string otherName, int pairId) { userName = name; otherUserName = otherName; curPairID = pairId; saveData = XMLSaver.saveData.GetInstanceData(curPairID); lastChatTimeStamp = saveData.lastChatTimeStamp; curSection = ChatManager.Instance.LoadSectionByID(curPairID, saveData.curSectionId); if (saveData.curNodeId != -1) { curRunningNode = curSection.nodes [saveData.curNodeId]; } Node front = curRunningNode.GetFront(); if (front != null) { lastSentence = GetLastSentence(front); } totalRectHeight = saveData.totalRectHeight; }
public virtual string GetLastSentence(ChatInstanceData data = null) { return(""); }
public override string GetLastSentence(ChatInstanceData data = null) { return("[图片]"); }
public override string GetLastSentence(ChatInstanceData data = null) { return(labels[data.GetOption(this)]); }
public override string GetLastSentence(ChatInstanceData data = null) { return(DialogLine); }