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(); } }
public void Buy() { Debug.Log(total); if (BackEndDataManager.instance.Get_Item((Item_Type)skill.price_type) >= total) { UiManager.instance.Check_Progress_Reward(Progress_Reward_Type.skill_upgrade, (int)Skill_s.skill_lv); Game_info_.Set_Game_Info(Game_Info_Type.skill_upgrade, (int)Skill_s.skill_lv); Quest_.Check_Daily_Quest(Daily_Quest_Type.skill_upgrade, (int)Skill_s.skill_lv); Skill_info skill_Info = BackEndDataManager.instance.Skill_Data.skill_Info.Find(x => x.int_num.Equals(skill.num)); if (skill_Info == null) { skill_Info = new Skill_info { int_num = skill.num, int_lv = (int)Skill_s.skill_lv }; BackEndDataManager.instance.Skill_Data.skill_Info.Add(skill_Info); } else { skill_Info.int_lv += (int)Skill_s.skill_lv; } BackEndDataManager.instance.Set_Item((Item_Type)skill.price_type, total, Calculate_Type.mius); Skill_s.Set_Skill_Val(skill_Info.int_num, skill_Info.int_lv); Player_stat.Set_Player_Stat((Ability_Type)skill.ability_type); BackEndDataManager.instance.Save_Skill_Data(); Set_Sub_Txt(); UiManager.instance.Check_Skill(); switch (skill.num) { case 0: PlayManager.instance.Start_Skill_0(); break; case 1: PlayManager.instance.Start_Skill_1(); break; case 2: PlayManager.instance.Start_Skill_2(); break; default: break; } } }
public void Get_Quest_Reward() { if (type.Equals(Quest_Type.daily)) { Quest_.Check_Daily_Quest(Daily_Quest_Type.daily_clear, 1); Game_info_.Set_Game_Info(Game_Info_Type.daily_quest_clear, 1); } Quest_info quest_Info = BackEndDataManager.instance.Quest_Data.quest_Info .Find(x => x.int_num.Equals(num) && x.type.Equals(type)); quest_Info.int_clear += 1; BigInteger big = BigInteger.Parse(data["reward_val_0"].ToString()); UiManager.instance.Set_QuestItem((Item_Type)data["reward_0"], big); BackEndDataManager.instance.Set_Item((Item_Type)data["reward_0"], big, Calculate_Type.plus); BackEndDataManager.instance.Save_Quest_Data(); Set_Val(); }
public void Totem_Upgrade() { if (BackEndDataManager.instance.Get_Item((Item_Type)data["price_type"]) >= Totem_.Get_Price((int)data["num"])) { Quest_.Check_Daily_Quest(Daily_Quest_Type.totem_upgrade, (int)Totem_.totem_Lv); Game_info_.Set_Game_Info(Game_Info_Type.totem_upgrade, (int)Totem_.totem_Lv); UiManager.instance.Check_Progress_Reward(Progress_Reward_Type.totem_upgrade, (int)Totem_.totem_Lv); BackEndDataManager.instance.Set_Item((Item_Type)data["price_type"], Totem_.Get_Price((int)data["num"]), Calculate_Type.mius); Totem_info info_ = BackEndDataManager.instance.Totem_Data.totem_info.Find(x => x.int_num.Equals((int)data["num"])); info_.int_lv += (int)Totem_.totem_Lv; BackEndDataManager.instance.Save_Totem_Data(); Check_Btn(); Set_Item(); } }
IEnumerator Co_Die() { switch (PlayManager.instance.Stage_State) { case Stage_State.stage: PlayManager.instance.Change_State(Player_State.Run); Add_Stage_Data(); UiManager.instance.Check_Progress_Reward(Progress_Reward_Type.monster, 1); break; case Stage_State.underground: PlayManager.instance.Change_State(Player_State.Run); if (monster_Type.Equals(Monster_Type.underground_Boss)) { Underground_.underground_Info.int_Max_Boss += 1; } else { Underground_.underground_Info.int_Max_Monster += 1; } UiManager.instance.Set_Underground_Info(); Underground_.Get_Underground_Random_Item(); break; case Stage_State.upgrade: PlayManager.instance.Change_State(Player_State.Reward); UiManager.instance.Set_Upgrade_Reward(true); PlayManager.instance.End_Upgrade(); break; case Stage_State.hell: PlayManager.instance.Change_State(Player_State.Run); Hell_.int_Max_Monster += 1; UiManager.instance.Set_Hell_Info(); break; default: break; } monster_State = Monster_State.Die; anim_Monster.Play("die"); switch (monster_Type) { case Monster_Type.Basic: PlayManager.instance.Set_Monster(); Game_info_.Set_Game_Info(Game_Info_Type.monster, 1); Quest_.Check_Daily_Quest(Daily_Quest_Type.monster, 1); break; case Monster_Type.Boss: PlayManager.instance.Stop_Boss_Timer(false); Game_info_.Set_Game_Info(Game_Info_Type.boss, 1); break; case Monster_Type.underground_Boss: PlayManager.instance.Set_Monster(); break; case Monster_Type.upgrade_Boss: break; case Monster_Type.hell_Boss: PlayManager.instance.Set_Monster(); break; case Monster_Type.goblin: Item item = Item_s.Get_Random_Goblin_Item(); BackEndDataManager.instance.Set_Item((Item_Type)item.item_num, item.val, Calculate_Type.plus); PlayManager.instance.Set_Monster(); Game_info_.Set_Game_Info(Game_Info_Type.gold_goblin, 1); break; default: break; } yield return(new WaitForSeconds(1.0f)); Destroy(gameObject); }