void Shackles() { cols = Physics.OverlapSphere(character.transform.position, 8f); int _mp = Skill_Register.GetSkill("MagicSkill4").mp_use; if (Property_Controller.Instance.Get_CurrentMP() >= _mp && TargetExist() && cd[3] <= 0) { used_skill = true; Property_Controller.Instance.Change_CurrentMP(-_mp); cd[3] = Skill_Register.GetSkill("MagicSkill4").cd; Property_Controller.Instance.Change_CurrentMP(-_mp); DestroyForTime_CSP destroy = shackle_particle.GetComponent <DestroyForTime_CSP>(); animator.SetTrigger("shackle_trigger"); float timer = Skill_Register.GetSkill("MagicSkill4").skill_level * 0.5f + 2f; destroy.timer = timer; for (int i = 0; i < cols.Length; i++) { if (cols[i] != null && cols[i].tag == "monster") { Monster_Manage monster = cols[i].GetComponent <Monster_Manage>(); monster.Monster_Manage_Change_Hp(-Skill_Damage.Instance.GetDamage("MagicSkill4")); Instantiate(shackle_particle, cols[i].transform.position, cols[i].transform.rotation); monster.stop = true; } } Collider[] temp_cols = cols; StartCoroutine(UnShackles(temp_cols, timer)); } }
public void Bomb() { int _mp = Skill_Register.GetSkill("MagicSkill1").mp_use; if (Property_Controller.Instance.Get_CurrentMP() >= _mp && cd[0] <= 0) { used_skill = true; cd[0] = Skill_Register.GetSkill("MagicSkill1").cd; Property_Controller.Instance.Change_CurrentMP(-_mp); //mp-=20; animator.SetTrigger("bomb_trigger"); cols = Physics.OverlapSphere(character.transform.position, 5f); for (int i = 0; i < cols.Length; i++) { if (cols[i] != null && cols[i].tag == "monster") { Monster_Manage monster = cols[i].GetComponent <Monster_Manage>(); monster.Monster_Manage_Change_Hp(-Skill_Damage.Instance.GetDamage("MagicSkill1")); } } Instantiate(bomb_particle, character.transform.position, character.transform.rotation); character.transform.position -= character.transform.forward * 8f; } }
void UltimateDamage() { for (int i = 0; i < cols.Length; i++) { if (cols[i] != null && cols[i].tag == "monster") { Monster_Manage monster = cols[i].GetComponent <Monster_Manage>(); monster.Monster_Manage_Change_Hp(-Skill_Damage.Instance.GetDamage("SwordSkill3")); } } }
void CallLightning() { for (int i = 0; i < cols.Length; i++) { if (cols[i] != null && cols[i].tag == "monster") { if (UnityEngine.Random.Range(0, 100) > 30) { Instantiate(lightning_particle, cols[i].transform.position, cols[i].transform.rotation); Monster_Manage monster = cols[i].GetComponent <Monster_Manage>(); monster.Monster_Manage_Change_Hp(-Skill_Damage.Instance.GetDamage("MagicSkill2")); } } } }
void StrikeDone() { for (int i = 0; i < cols.Length; i++) { if (cols[i].tag == "monster") { Monster_Manage monster = cols[i].GetComponent <Monster_Manage>(); monster.Monster_Manage_Change_Hp(-Skill_Damage.Instance.GetDamage("SwordSkill2")); Instantiate(slash_particle, cols[i].transform.position, cols[i].transform.rotation); Instantiate(strike_sound, character.transform.position, character.transform.rotation); } } character.transform.Find("Swordman_Body001").SendMessage("show"); character.transform.Find("Swordman_Sword").SendMessage("show"); }
void Rotate_Around() { cols = Physics.OverlapSphere(transform.position, 1f); for (int i = 0; i < cols.Length; i++) { if (cols[i] != null && cols[i].tag == "monster") { Monster_Manage monster = cols[i].GetComponent <Monster_Manage>(); monster.Monster_Manage_Change_Hp(-Skill_Damage.Instance.GetDamage("MagicSkill3")); } } transform.RotateAround(character.transform.position, Vector3.up, 20); transform.LookAt(character.transform.position); transform.position = character.transform.position; transform.position -= transform.forward * 3f; transform.position = new Vector3(transform.position.x, 0, transform.position.z); //if (Vector3.Dot(transform.forward, character.transform.GetChild(0).forward) < 0) //{ Instantiate(particle, transform.position, transform.rotation); //} }
void FlameMode() { if (Property_Controller.Instance.Get_CurrentMP() < 1) { flame_mode = false; } if (flame_mode && Property_Controller.Instance.Get_CurrentMP() >= 1) { Property_Controller.Instance.Change_CurrentMP(-1); cols = Physics.OverlapSphere(character.transform.position, 5f); Property_Controller.Instance.Change_AD(-ad_add); ad_add = (int)(Property_Controller.Instance.Get_AD() * 0.3); Property_Controller.Instance.Change_AD(ad_add); for (int i = 0; i < cols.Length; i++) { if (cols[i] != null && cols[i].tag == "monster") { Monster_Manage monster = cols[i].GetComponent <Monster_Manage>(); monster.Monster_Manage_Change_Hp(-Skill_Damage.Instance.GetDamage("SwordSkill4")); } } } }