Пример #1
0
    private void KeyboardInputs()
    {
        if (Input.GetButton(inputIndex + "Move"))
        {
            movementUpgrade.Call();
        }
        else
        {
            movementUpgrade.Release();
        }

        if (Input.GetButton(inputIndex + "Attack"))
        {
            attackUpgrade.Call();
        }
        else
        {
            attackUpgrade.Release();
        }
    }
Пример #2
0
    IEnumerator TimedAttack()
    {
        while (true)
        {
            yield return(new WaitForSeconds(Random.Range(2, 3)));

            attackUpgrade.Call();
            yield return(new WaitForSeconds(1));

            attackUpgrade.Release();
        }
    }
Пример #3
0
    IEnumerator TimedMove()
    {
        while (true)
        {
            yield return(new WaitForSeconds(Random.Range(1.5f, 2.5f)));

            movementUpgrade.Call();
            yield return(new WaitForSeconds(.5f));

            movementUpgrade.Release();
        }
    }