예제 #1
0
    public void Job_Upgrade()
    {
        if (BackEndDataManager.instance.Get_Item((Item_Type)data["reward_0"]) >= Job_.Get_Price((int)data["num"]))
        {
            BackEndDataManager.instance.Set_Item((Item_Type)data["reward_0"], Job_.Get_Price((int)data["num"]), Calculate_Type.mius);

            Job_info info_ = BackEndDataManager.instance.Job_Data.job_info.Find(x => x.int_num.Equals((int)data["num"]));

            if (info_ == null)
            {
                Job_info job_ = new Job_info()
                {
                    int_lv   = (int)Job_.Job_Lv,
                    int_num  = (int)data["num"],
                    str_time = BackEndDataManager.instance.WebCheck().AddSeconds((int)data["job_time"] + 1).ToString()
                };

                BackEndDataManager.instance.Job_Data.job_info.Add(job_);
            }
            else
            {
                info_.int_lv += (int)Job_.Job_Lv;
            }

            UiManager.instance.Check_Progress_Reward(Progress_Reward_Type.job_upgrade, (int)Job_.Job_Lv);
            Game_info_.Set_Game_Info(Game_Info_Type.job_upgrade, (int)Job_.Job_Lv);
            Quest_.Check_Daily_Quest(Daily_Quest_Type.job_upgrade, (int)Job_.Job_Lv);

            BackEndDataManager.instance.Save_Job_Data();

            Set_Item();
            Check_Slider();
        }
    }
예제 #2
0
    public void Set_Item()
    {
        Job_info job_ = BackEndDataManager.instance.Job_Data.job_info.Find(x => x.int_num.Equals((int)data["num"]));

        int num = (int)data["num"];

        img_Job.sprite         = Utill.Get_Job_Sp(num);
        txt_job_name.text      = data["name"].ToString();
        txt_job_Lv.text        = string.Format("{0}.{1}", "Lv", job_ == null ? 0 : job_.int_lv);
        txt_job_reward.text    = UiManager.instance.GetGoldString(Job_.Get_Reward(num));
        txt_job_time.text      = Job_.Get_Time(num);
        img_job_Upgrade.sprite = Utill.Get_Item_Sp((Item_Type)data["price_type"]);
        Set_Item_Upgrade(Job_.Job_Lv);

        Slider_time.maxValue = (int)data["job_time"];
    }
예제 #3
0
 public void Set_Btn()
 {
     if (data != null)
     {
         btn_job.interactable = BackEndDataManager.instance.Get_Item((Item_Type)data["reward_0"]) >= Job_.Get_Price((int)data["num"]);
     }
 }
예제 #4
0
 public void Set_Item_Upgrade(Character_Lv _Lv)
 {
     txt_job_add_reward.text = string.Format("+{0} ({1})", UiManager.instance.GetGoldString(Job_.Get_Add_Reward((int)data["num"])), (int)_Lv);
     txt_job_price_val.text  = UiManager.instance.GetGoldString(Job_.Get_Price((int)data["num"]));
 }