Example #1
0
    // Update is called once per frame
    void Update()
    {
        if (this.showConfirm == true && this.duiHuaUImanager.isDuiHuaEnd())
        {
            this.confirmManageUI.showConfirm(this.getLiHuiURL(), "年轻人,你愿意帮我找到补肺丸吗? 红瓶的那种!?");
            this.status      = 1;
            this.showConfirm = false;
        }

        if (this.status == 1 && !this.confirmManageUI.isActiveAndEnabled)
        {
            if (this.confirmManageUI.getResult())
            {
                // do action
                Debug.Log("regisiter task is " + this.task.getTaskName());
                if (taskMananger.regisisterTask(this.task))
                {
                    this.task.setTaskStatus(TaskConstant.STATUS_BEGIN);
                    this.task.setTaskOwner(roundController.getCurrentRoundChar().getName());
                    this.taskMananger.UpdateHistoryTask(this.task);
                }
                this.status = 0;
            }
        }
    }