示例#1
0
 void Update()
 {
     if (areaButton.CanFire() && Time.time > nextFire)
     {
         nextFire = Time.time + fireRate;
         Instantiate(shot, shotSpawn.position, shotSpawn.rotation);
         audioSource.Play();
     }
 }