Ejemplo n.º 1
0
    public void Launch_attack()
    {
        if (target != null && this.Is_alive() && target.Is_alive())
        {
            Instantiate(projectile, GetComponent <Transform>().position, GetComponent <Transform>().rotation).GetComponent <Projectile>().set_target(target, Calculate_damage(), this);
            mana.curr += mana_on_attack.curr;
            GetComponent <AudioSource>().Play();
            if (mana.curr >= mana.Actual())
            {
                Launch_ability();
                mana.curr = mana.curr - mana.Actual();
            }

            Invoke("Launch_attack", (1.0f / att_speed.curr));
        }
        else
        {
            target = null;
        }
    }
Ejemplo n.º 2
0
 public virtual void Reset_round()
 {
     health.curr = health.Actual();
     mana.curr   = 0;
     Remove_energy();
 }