// Update is called once per frame void Update() { if (isActivated && Input.GetKey(key) && !inAction) { player.ResetAttackUpdate(); inAction = true; } if (inAction) { if (!player.AttackUpdate(key, ball, ballNum, false)) { inAction = false; } } }