//显示任务按钮 private void ShowCompleteBtn() { int taskId = /*tkModel.*/ curTask.taskId; Text text = btnNext.transform.FindChild("Text").GetComponent <Text>(); NpcTaskState nState = tkModel.GetTaskState(taskId); switch (nState) { case NpcTaskState.NONE: break; case NpcTaskState.UNREACHED: text.text = ContMgr.getCont("npctasktalk2"); btnNext.interactable = false; break; case NpcTaskState.REACHED: text.text = ContMgr.getCont("npctasktalk2"); btnNext.interactable = true; btnNext.onClick = OnAcceptTask; break; case NpcTaskState.UNFINISHED: text.text = ContMgr.getCont("npctasktalk3"); btnNext.interactable = false; break; case NpcTaskState.FINISHED: text.text = ContMgr.getCont("npctasktalk3"); btnNext.interactable = true; btnNext.onClick = OnSubmitTask; break; default: break; } }