Пример #1
0
        public void SetData(SysTask taskVo, int color)
        {
            _color                    = color;
            _taskVo                   = taskVo;
            _titleLabel.text          = taskVo.name;
            _taskExpRewardLabel.text  = taskVo.exp.ToString();
            _taskGoldRewardLabel.text = taskVo.gold.ToString();
            var task = new TaskVo();

            task.Statu       = TaskStatu.StatuAccepted;
            task.TaskId      = (uint)taskVo.taskId;
            task.SysTaskVo   = taskVo;
            task.CanCommit   = false;
            _taskDetail.text = TaskUtil.GetTaskDescribe(task);
            switch (_color)
            {
            case 1:
                _taskDetail.color = Color.white;
                break;

            case 2:
                _taskDetail.color = Color.green;
                break;

            case 3:
                _taskDetail.color = Color.blue;
                break;

            case 4:
                _taskDetail.color = Color.cyan;
                break;

            case 5:
                _taskDetail.color = Color.magenta;
                break;
            }
        }
Пример #2
0
 public void SetData(TaskVo taskVo)
 {
     _taskVo = taskVo;
     _taskReward.SetActive(true);
     _taskExpLabel.text      = taskVo.SysTaskVo.exp + "";
     _taskGoldLabel.text     = taskVo.SysTaskVo.gold + "";
     _taskTitleLabel.text    = taskVo.SysTaskVo.name;
     _taskDescribeLabel.text = LanguageManager.GetWord("MainLeftView.mainTask") + TaskUtil.GetTaskDescribe(taskVo);
     _taskRewardLabel.text   = "任务奖励:";
 }