Example #1
0
 void OnFire()
 {
     if (_canShoot)
     {
         projectileLauncher.OnFire();
     }
 }
Example #2
0
    // Update is called once per frame
    void Update()
    {
        shotTimer -= Time.deltaTime;

        if (shotTimer < 0.0f)
        {
            ResetShotTimer();
            if (canMoveAndShoot)
            {
                myLauncher.OnFire();
            }
        }
    }