/// <summary> /// 스킬을 해금하고 획득합니다.이미 있으면 아무것도 안하지롱 /// </summary> private void UnlockSkill(eSkill _skill) { switch (_skill) { case eSkill.RESTORE: if (unlockWind == false) //해금하지 않은 상태라면 { unlockRestore = true; skillRestore = new Skill_Restore(PlayerController.Instance); RestoreInit(); skillList.Add(skillRestore); } break; case eSkill.WINDGILDE: if (unlockWind == false) //해금하지 않은 상태라면 { unlockWind = true; skillWindGilde = new Skill_WindGlide(PlayerController.Instance); WindInit(); skillList.Add(skillWindGilde); } break; case eSkill.LIGHTNINGSHOCK: if (unlockLightning == false) //해금하지 않은 상태라면 { unlockLightning = true; skillLightningShock = new Skill_LightningShock(PlayerController.Instance); LightningInit(); skillList.Add(skillLightningShock); } break; case eSkill.WATERWAVE: if (unlockWater == false) //해금하지 않은 상태라면 { unlockWater = true; skillWaterWave = new Skill_WaterWave(PlayerController.Instance); WaterInit(); skillList.Add(skillWaterWave); } break; default: break; } }
/// <summary> /// unlock 여부에 따라 리스트에 스킬을 추가합니다. /// </summary> public void CheckSkills() { if (skillList != null) { skillList.Clear(); } skillList = new List <Skill>(); if (unlockWind == true) { skillWindGilde = new Skill_WindGlide(PlayerController.Instance); WindInit(); skillList.Add(skillWindGilde); } if (unlockWater == true) { skillWaterWave = new Skill_WaterWave(PlayerController.Instance); WaterInit(); skillList.Add(skillWaterWave); } if (unlockLightning == true) { skillLightningShock = new Skill_LightningShock(PlayerController.Instance); LightningInit(); skillList.Add(skillLightningShock); } if (unlockRestore == true) { skillRestore = new Skill_Restore(PlayerController.Instance); RestoreInit(); skillList.Add(skillRestore); } }