void OnFire() { if (_canShoot) { projectileLauncher.OnFire(); } }
// Update is called once per frame void Update() { shotTimer -= Time.deltaTime; if (shotTimer < 0.0f) { ResetShotTimer(); if (canMoveAndShoot) { myLauncher.OnFire(); } } }