Beispiel #1
0
 public void Init(NpcQuestItemDTO taskItem, int taskIndex)
 {
     m_TaskItem  = taskItem;
     m_TaskIndex = taskIndex;
     if (taskItem.state != NpcState.None && m_TaskItem.state != NpcState.Received)
     {
         GameObject go = Global.gApp.gResMgr.InstantiateObj(Wndid.TaskStateNode);
         m_TaskStateNode = go.GetComponent <TaskStateNode>();
         m_TaskStateNode.Init(this, GetTaskUINode(), taskId: taskItem.npcQuestId, taskState: taskItem.state);
         PlayIdle();
     }
     FreshDropInfo();
 }
Beispiel #2
0
 public void ForceFreshTaskState()
 {
     if (m_TaskStateNode == null)
     {
         if (m_TaskItem.state != NpcState.None && m_TaskItem.state != NpcState.Received)
         {
             GameObject go = Global.gApp.gResMgr.InstantiateObj(Wndid.TaskStateNode);
             m_TaskStateNode = go.GetComponent <TaskStateNode>();
             m_TaskStateNode.Init(this, GetTaskUINode(), taskId: m_TaskItem.npcQuestId, taskState: m_TaskItem.state);
         }
     }
     FreshTaskState();
 }