Example #1
0
    IEnumerator Stone_Cold_Stunner(float stunDuration)
    {
        yield return(new WaitForSeconds(stunDuration));

        stun_Particles.SetActive(false);
        audioSource_Spell_Cast[1].clip = Game_Manager.Get().audioArray[4];
        audioSource_Spell_Cast[1].Play();
        character.enabled = true;
    }
Example #2
0
 private void S_ManaDrain(string spell_ID, Vector3 spell_Direction, Vector3 mouseLocation, float manaCost, float damageDealt, Transform target)
 {
     audioSource_Spell_Cast[0].clip = Game_Manager.Get().audioArray[1];
     audioSource_Spell_Cast[0].Play();
     if (mana_Drain_Object != null)
     {
         mana_Drain_Object.Drain_Dat_Mana_Son();
     }
 }
Example #3
0
 private void S_FistOfVengeance(string spell_ID, Vector3 spell_Direction, Vector3 mouseLocation, float manaCost, float damageDealt, Transform target)
 {
     if (hp_Mana_System.Mana_Cost(manaCost))
     {
         fistOfVengeanceScript.Get_Fisted(mouseLocation);
     }
     else
     {
         print("NOT ENOUGH MANA");
         audioSource_Spell_Cast[0].clip = Game_Manager.Get().audioArray[7];
         audioSource_Spell_Cast[0].Play();
     }
 }
Example #4
0
 private void S_FireBall(string spell_ID, Vector3 spell_Direction, Vector3 mouseLocation, float manaCost, float damageDealt, Transform target)
 {
     if (hp_Mana_System.Mana_Cost(manaCost))
     {
         fireball = Instantiate(particles_FireBall, hands.position + Vector3.up, Quaternion.LookRotation(transform.forward));
     }
     else
     {
         print("NOT ENOUGH MANA");
         audioSource_Spell_Cast[0].clip = Game_Manager.Get().audioArray[7];
         audioSource_Spell_Cast[0].Play();
     }
 }
Example #5
0
 private void GetAudio(PointerEventData spell_Block)
 {
     if (spell_Block.pointerDrag.GetComponent <DragDrop>() != null && spell_ID != "")
     {
         audioSource.clip = Game_Manager.Get().audioArray[6];
         audioSource.Play();
     }
     if (spell_Block.pointerDrag.GetComponent <Drag_Drop_Slot>() != null && spell_ID != "")
     {
         audioSource.clip = Game_Manager.Get().audioArray[6];
         audioSource.Play();
     }
 }
Example #6
0
    private void OnControllerColliderHit(ControllerColliderHit hit)
    {
        if (hit.gameObject.layer == 10 & currently_Charging)
        {
            stun_Particles.transform.position = transform.position + Vector3.up * 10f;
            stun_Particles.SetActive(true);
            audioSource_Spell_Cast[1].clip = Game_Manager.Get().audioArray[3];
            audioSource_Spell_Cast[1].Play();
            currently_Charging = false;
            character.enabled  = false;
            StartCoroutine(Stone_Cold_Stunner(2f));
        }

        if (hit.gameObject.tag == "Player")
        {
            hp_Mana_Other_Player = hit.gameObject.GetComponent <HP_Mana>();
            hp_Mana_Other_Player.Damage(100f);
        }
    }
Example #7
0
 private void S_Blink(string spell_ID, Vector3 spell_Direction, Vector3 mouseLocation, float manaCost, float damageDealt, Transform target)
 {
     if (hp_Mana_System.Mana_Cost(manaCost))
     {
         usedValues.Add(RandomPositions(0, 4));
         particles_TeleportToLoc = GetPooledObject(teleportToLocParticlesList);
         particle_TeleportSmoke  = GetPooledObject(teleportSmokeParticlesList);
         particles_TeleportToLoc.transform.position = transform.position;
         particle_TeleportSmoke.transform.position  = blink_Safe_Spot[usedValues[0]].position;
         particles_TeleportToLoc.SetActive(true);
         particle_TeleportSmoke.SetActive(true);
         transform.position = blink_Safe_Spot[usedValues[0]].position;
     }
     else
     {
         print("NOT ENOUGH MANA");
         audioSource_Spell_Cast[0].clip = Game_Manager.Get().audioArray[7];
         audioSource_Spell_Cast[0].Play();
     }
 }
Example #8
0
 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();
     }
 }
Example #9
0
 private void A_Charge(string spell_ID, Vector3 spell_Direction, Vector3 mouseLocation, float manaCost, float damageDealt, Transform target)
 {
     audioSource_Spell_Cast[0].clip = Game_Manager.Get().audioArray[2];
     audioSource_Spell_Cast[0].Play();
     StartCoroutine(Charge(spell_Direction));
 }
Example #10
0
 private void PullSpellSound()
 {
     audioSource.clip = Game_Manager.Get().audioArray[5];
     audioSource.Play();
 }