// Update is called once per frame void Update() { rotateCounter += Time.deltaTime; shootCounter += Time.deltaTime; if (rotateCounter > beatPeriod) { turret.PlayRotationAnimation(); rotateCounter -= beatPeriod; } if (shootCounter > beatPeriod) { turret.PlayShootAnimation(); shootCounter -= beatPeriod; } }