Exemplo n.º 1
0
    void LoadItem(DailyTaskResp.DailyTask task)
    {
        TaskItem item = Instantiate(prefab, parent).GetComponent <TaskItem>();

        item.Inits(task);
        items.Add(item);
    }
Exemplo n.º 2
0
 public void Inits(DailyTaskResp.DailyTask task)
 {
     info               = task;
     headIcon.sprite    = BundleManager.Instance.GetSprite("task/meirirenwu_pic_" + info.task_icon);
     nameLb.text        = info.task_title;
     rewardIcon.sprite  = BundleManager.Instance.GetSprite("common/normal_log_1");
     rewardCountLb.text = info.task_award.ToString();
     progressLb.text    = info.actule_times + "/" + info.daliy_times;
     UGUIEventListener.Get(goTaskBtn).onClick = delegate { ReceiveTask(); };
     UGUIEventListener.Get(getrewardBtn.gameObject, AudioManager.AudioSoundType.BtnReward).onClick = delegate { Reward(); };
     UpdateProgree(null);
 }