using UnityEngine; using System.Collections; using System.Collections.Generic; public class Follower { public int userId; public ChatMsgEvent OnMsgAdded; private string lastMsg = ""; private System.DateTime dateTime; public int newMsgCount = 0; public Follower() { OnMsgAdded = new ChatMsgEvent (); } public List GetMsgList() { return ChatManager.GetInstance().GetFollowMsgList(userId); } public void AddMsg(ChatMsg chatMsg) { lastMsg = chatMsg.content; dateTime = chatMsg.dateTime; newMsgCount++; OnMsgAdded.Invoke (chatMsg); } public void ResetMsgCount() { newMsgCount = 0; } public string GetLastMsg() { return lastMsg; } public string GetLastMsgTime() { if(dateTime == null) return ""; return dateTime.ToString(); } }