Ejemplo n.º 1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.transform.tag == "Player")
     {
         kill_You_Dead = other.GetComponent <HP_Mana>();
         kill_You_Dead.Damage(100f);
     }
 }
Ejemplo n.º 2
0
 public void Drain_Dat_Mana_Son()
 {
     players_Near_Pillar = Physics.OverlapSphere(transform.position, 30f);
     foreach (var player in players_Near_Pillar)
     {
         if (player.gameObject.tag == "Player")
         {
             manaShootDirection = player.transform.position - transform.position;
             transform.rotation = Quaternion.LookRotation(manaShootDirection);
             give_Me_Blue_Koolaid = player.gameObject.GetComponent<HP_Mana>();
             give_Me_Blue_Koolaid.Blue_Koolaid();
             manaDrainSound.Play();
             manaDrainParticles.Play();
         }
     }
 }
Ejemplo n.º 3
0
    private void Start()
    {
        hp_Mana_System = GetComponent <HP_Mana>();
        hash_Browns.Add("S_DeathRay", S_DeathRay); // Need To Add All Spells In CVS file
        hash_Browns.Add("S_Fireball", S_FireBall);
        hash_Browns.Add("S_DrainMana", S_ManaDrain);
        hash_Browns.Add("S_TeleportToTarget", S_TeleportToTarget);
        hash_Browns.Add("S_Blink", S_Blink);
        hash_Browns.Add("S_FistOfVengeance", S_FistOfVengeance);
        hash_Browns.Add("A_Charge", A_Charge);
        character = GetComponent <CharacterController>();
        GameObject fistOfVengenaceObj = (GameObject)Instantiate(particles_FistOfVengeance);

        fistOfVengeanceScript = fistOfVengenaceObj.GetComponent <FistOfVengeance>();
        fistOfVengenaceObj.SetActive(false);
        stun_Particles = (GameObject)Instantiate(stun_Particles);
        stun_Particles.SetActive(false);

        for (int i = 0; i < TotalAmountOfSpellsAllowed; i++)
        {
            GameObject telepotToLocObj  = (GameObject)Instantiate(particles_TeleportToLoc);
            GameObject teleportSmokeObj = (GameObject)Instantiate(particle_TeleportSmoke);

            telepotToLocObj.SetActive(false);
            teleportSmokeObj.SetActive(false);

            teleportToLocParticlesList.Add(telepotToLocObj);
            teleportSmokeParticlesList.Add(teleportSmokeObj);

            if (i == TotalAmountOfSpellsAllowed - 1)
            {
                for (int j = 0; j < TotalAmountOfSpellsAllowed + 5; j++)
                {
                    GameObject particles_DeathRayObj = (GameObject)Instantiate(particles_DeathRay);
                    particles_DeathRayObj.SetActive(false);
                    particles_DeathRayList.Add(particles_DeathRayObj);
                }
            }
        }
    }