예제 #1
0
        private void OnTaskButtonClick(GameObject button)
        {
            if (!_isDialog)
            {
                switch (_currentTaskVo.Statu)
                {
                case TaskStatu.StatuUnAccept:
                    _taskModel.AccetpTask(_currentTaskVo.TaskId, _npcDialogModel.CurrentNpcId);
                    break;

                case TaskStatu.StatuAccepted:
                    if (_currentTaskVo.CanCommit)
                    {
                        _taskModel.CommitTask(_currentTaskVo.TaskId, _npcDialogModel.CurrentNpcId);
                    }
                    else
                    {
                        MessageManager.Show("任务还没完成哦");
                    }
                    break;
                }
                Singleton <NpcDialogView> .Instance.CloseView();
            }
            else
            {
                _talkIndex += 1;
                ShowRoleDialog();
            }
        }
예제 #2
0
        private void EndDialog()
        {
            switch (_currentTaskVo.Statu)
            {
            case TaskStatu.StatuUnAccept:
                _taskModel.AccetpTask(_currentTaskVo.TaskId, _npcDialogModel.CurrentNpcId);
                break;

            case TaskStatu.StatuAccepted:
                if (_currentTaskVo.CanCommit)
                {
                    _taskModel.CommitTask(_currentTaskVo.TaskId, _npcDialogModel.CurrentNpcId);
                }
                else
                {
                    MessageManager.Show(LanguageManager.GetWord("NpcDialogView.NotFinished"));
                }
                break;
            }
            CloseView();
            Singleton <MainView> .Instance.OpenView();
        }