private void KeyboardInputs() { if (Input.GetButton(inputIndex + "Move")) { movementUpgrade.Call(); } else { movementUpgrade.Release(); } if (Input.GetButton(inputIndex + "Attack")) { attackUpgrade.Call(); } else { attackUpgrade.Release(); } }
IEnumerator TimedAttack() { while (true) { yield return(new WaitForSeconds(Random.Range(2, 3))); attackUpgrade.Call(); yield return(new WaitForSeconds(1)); attackUpgrade.Release(); } }
IEnumerator TimedMove() { while (true) { yield return(new WaitForSeconds(Random.Range(1.5f, 2.5f))); movementUpgrade.Call(); yield return(new WaitForSeconds(.5f)); movementUpgrade.Release(); } }