Exemple #1
0
    public void Attack()
    {
        if (!CanRun)
        {
            return;
        }

        minionSoundControler.PlaySound(MinionAction.attack);
        opponent.minionSoundControler.PlaySound(MinionAction.attack);

        particleControler.displayAttack(opponent.minionType);
        opponent.particleControler.displayAttack(minionType);

        Destructible opponentDestructible = opponent.GetComponent <Destructible>();

        opponentDestructible.CmdTakeDamage(computeDamages());

        _destructible.CmdTakeDamage(opponent.computeDamages());

        Invoke("Attack", minionsInformations.attackSpeed);
    }