Пример #1
0
    void Spell1()
    {
        if (button1Pressed == false && manaScript.myMana >= manaCost1)
        {
            if (Input.GetButtonDown("Button1"))
            {
                button1Pressed = true;
                manaScript.ManaCost(manaCost1);
                StartCoroutine(delayBeforeNextSpell(1, cooldown1));

                float newAttackRate = 0.75f;
                int   spellDuration = 5;
                meleeScript.IncreaseAttackSpeed(newAttackRate, spellDuration);

                networkView.RPC("UpdateAttackSpeedEffects", RPCMode.All, myTransform.position, Quaternion.identity);
            }
        }
    }