/// <summary> /// 添加NPC /// </summary> /// <param name="npcId"></param> /// <param name="view"></param> public void AddNpc(int npcId, INpcView view) { lock (npcLock) { if (!Npcs.ContainsKey(npcId)) { Npcs.Add(npcId, view); } } }
public void BindView(INpcView view) { npcView = view; var _npcView = view as NpcView; if (_npcView != null) { _npcView.viewObject = this; _npcView.gameObject = gameObject; } }