private void OnTriggerEnter(Collider other) { if (other.transform.tag == "Player") { kill_You_Dead = other.GetComponent <HP_Mana>(); kill_You_Dead.Damage(100f); } }
private void S_DeathRay(string spell_ID, Vector3 spell_Direction, Vector3 mouseLocation, float manaCost, float damageDealt, Transform target) { if (hp_Mana_System.Mana_Cost(manaCost)) { audioSource_Spell_Cast[0].clip = Game_Manager.Get().audioArray[0]; audioSource_Spell_Cast[0].Play(); for (int i = 0; i < 10; i++) { particles_DeathRay = GetPooledObject(particles_DeathRayList); particles_DeathRayList[i].transform.position = hands.transform.position + spell_Direction * i / 10; particles_DeathRayList[i].SetActive(true); } if (target.tag == "Player") { hp_Mana_System.Damage(damageDealt); } } else { print("NOT ENOUGH MANA"); audioSource_Spell_Cast[0].clip = Game_Manager.Get().audioArray[7]; audioSource_Spell_Cast[0].Play(); } }