Exemple #1
0
    //public void AssignFire()
    //{
    //    FindObjectOfType<DoSpell>().AssignSpell(new FireAttack());
    //}

    //public void AssignIce()
    //{
    //    FindObjectOfType<DoSpell>().AssignSpell(new IceAttack());
    //}

    //public void AssignPoison()
    //{
    //    FindObjectOfType<DoSpell>().AssignSpell(new PoisonAttack());
    //}

    public void AssignAttack()
    {
        AttackWithParticles attack = this.GetComponent <AttackWithParticles>();

        if (attack != null)
        {
            FindObjectOfType <DoSpell>().AssignSpell(attack);
        }
    }
Exemple #2
0
 public void AssignSpell(AttackWithParticles spell)
 {
     spellWithParticles = spell;
     spellName          = spell.GetType().ToString();
 }
 public void SetAttackType(AttackWithParticles _attack)
 {
     this.attack = _attack;
 }