public bool ChangeSkill(SpawnCode code, GameObject _parents, GameObject _child) { //언락 여부 체크 if (!spawn.GetIsUnlocked(code)) { return(false); } //스킬 생성 & 할당 string what = (code.ToString().Substring(0, 1)); switch (what) { case "R": spawn.GetSkill_Red(code, _child); break; case "G": spawn.GetSkill_Green(code, _child); break; case "B": spawn.GetSkill_Blue(code, _child); break; } //스킬 메커니즘 초기화 _parents.GetComponent <PlayerStatus>().Init_Skill(); //서버 통신 router.PostRouter(PostType.PLAYER_SKILL_CHANGE, code); return(true); }
public void RepairListSetting() { for (int i = 0; i < list_weapon.Count; i++) { if (sc.GetIsUnlocked(list_weapon[i].m_code) && list_weapon[i].dualbility < 100) { list_weapon_R.Add(list_weapon[i]); } } for (int i = 0; i < list_amulet.Count; i++) { if (sc.GetIsUnlocked(list_amulet[i].m_code) && list_amulet[i].dualbility < 100) { list_amulet_R.Add(list_amulet[i]); } } for (int i = 0; i < list_stone.Count; i++) { if (sc.GetIsUnlocked(list_stone[i].m_code) && list_stone[i].dualbility < 100) { list_stone_R.Add(list_stone[i]); } } }
public void QuestMonsterCheck(MonsterCode monsterCode) //퀘스트 진행 상황 체크 { int i; for (i = 0; i < questAcessList.Count; i++) { QuestType questType = questAcessList[i].quest_type; switch (questType) { case QuestType.Type_Kill: if (questAcessList[i].questItemCur < questAcessList[i].questItemMax && questAcessList[i].questmonstercode == monsterCode) { playerQuestList[FindNameToQuestInfo(questAcessList[i].quest_name).quest_code].questItemCur++; } break; case QuestType.Tutorial: if (questAcessList[i].quest_code == 23) //&& questAcessList[i].questEquipment == 지금 장착한 장비) { playerQuestList[FindNameToQuestInfo(questAcessList[i].quest_name).quest_code].questItemCur++; break; } else if (questAcessList[i].quest_code == 23) { playerQuestList[FindNameToQuestInfo(questAcessList[i].quest_name).quest_code].questItemCur++; break; } else { playerQuestList[FindNameToQuestInfo(questAcessList[i].quest_name).quest_code].questItemCur++; break; } case QuestType.Repeat: if (questAcessList[i].questItemCur < questAcessList[i].questItemMax) { playerQuestList[FindNameToQuestInfo(questAcessList[i].quest_name).quest_code].questItemCur++; } break; case QuestType.Gold_Collect: { questAcessList[i].questItemCur = capital.money; playerQuestList[FindNameToQuestInfo(questAcessList[i].quest_name).quest_code].questItemCur = capital.money; } break; case QuestType.GetItem_Type_Kill: { if (sc.GetIsUnlocked(questAcessList[i].quest_reward_item) == false) { sc.UnlockCode(questAcessList[i].quest_reward_item); } if (questAcessList[i].questItemCur < questAcessList[i].questItemMax && ps.GetComponent <Base_Weapon>().m_code == questAcessList[i].quest_reward_item && questAcessList[i].questmonstercode == monsterCode) { playerQuestList[FindNameToQuestInfo(questAcessList[i].quest_name).quest_code].questItemCur++; } } break; } } //gameObject.transform.GetComponent<QuestUI>().QuestBoardSetting(); // 라우터 ( Quest item ) if (questAcessList.Count != 0) { networkRouter.PostRouter(PostType.PLAYER_QUEST_ITEM_UPDATE, playerQuestList[questAcessList[i - 1].quest_code]); } }
public void SkillSlotSetting() { if (skillType == 0) //Red { // for (int i = 0; i < list_red.Count; i++) //skillImageArray[i].sprite = list_red[i].m_spritePath; Skill_Red tmp = ps.skill.GetComponent <Skill_Red>(); skillNameText.text = tmp.m_title; cooldownText.text = "쿨타임 : " + tmp.m_delay.ToString(); SkillDescriptionText.text = tmp.m_description; useSkillImage.sprite = spriteSupplier.GetSource(list_red[0].m_code); for (int i = 0; i < list_red.Count; i++) { if (sc.GetIsUnlocked(list_red[i].m_code) == false) { skillImageArray[i].transform.GetChild(0).gameObject.SetActive(false); skillImageArray[i].GetComponent <Button>().interactable = false; if (list_red[i].m_code != tmp.m_code) { skillImageArray[i].transform.GetChild(1).gameObject.SetActive(false); } } skillImageArray[i].sprite = spriteSupplier.GetSource(list_red[i].m_code); } } else if (skillType == 1)//Green { //SkillList = RedSkillLIst //for(int i =0; i<skillImageArray.Length;i++) //skillImageArray[i].sprite = SkillList[i].Image; Skill_Green tmp = ps.skill.GetComponent <Skill_Green>(); skillNameText.text = tmp.m_title; cooldownText.text = "쿨타임 : " + tmp.m_delay.ToString(); SkillDescriptionText.text = tmp.m_description; useSkillImage.sprite = spriteSupplier.GetSource(list_green[0].m_code); for (int i = 0; i < list_green.Count; i++) { if (sc.GetIsUnlocked(list_green[i].m_code) == false) { skillImageArray[i].transform.GetChild(0).gameObject.SetActive(false); skillImageArray[i].GetComponent <Button>().interactable = false; } if (list_green[i].m_code != tmp.m_code) { skillImageArray[i].transform.GetChild(1).gameObject.SetActive(false); } skillImageArray[i].sprite = spriteSupplier.GetSource(list_green[i].m_code); } } else { //SkillList = RedSkillLIst //for(int i =0; i<skillImageArray.Length;i++) //skillImageArray[i].sprite = SkillList[i].Image; Skill_Blue tmp = ps.skill.GetComponent <Skill_Blue>(); skillNameText.text = tmp.m_title; cooldownText.text = "쿨타임 : " + tmp.m_delay.ToString(); SkillDescriptionText.text = tmp.m_description; useSkillImage.sprite = spriteSupplier.GetSource(list_blue[0].m_code); for (int i = 0; i < list_blue.Count; i++) { if (sc.GetIsUnlocked(list_blue[i].m_code) == false) { skillImageArray[i].transform.GetChild(0).gameObject.SetActive(false); skillImageArray[i].GetComponent <Button>().interactable = false; } if (list_blue[i].m_code != tmp.m_code) { skillImageArray[i].transform.GetChild(1).gameObject.SetActive(false); } skillImageArray[i].sprite = spriteSupplier.GetSource(list_blue[i].m_code); } } //for (int i = 0; i < skillList.Count; i++) //{ // if (skillList[i].unlock == false) //해금시 이미지 안보이게 // skillImageArray[i].transform.GetChild(0).GetComponent<Image>().enabled = false; // if(skillList[i].Use == false) //비장착시 이미지 안보이게 // skillImageArray[i].transform.GetChild(1).GetComponent<Image>().enabled = false; //} }