コード例 #1
0
 //if consumed, play audio clip. Now with the powerup despawned,
 //set the next spawn time on the managing ObjectSpawner script
 void OnDespawn()
 {
     if (useClip)
     {
         AudioManager.Play3D(useClip, transform.position);
     }
     spawner.SetRespawn();
 }
コード例 #2
0
 //if consumed, play audio clip. Now with the Collectibl despawned,
 //set the next spawn time on the managing ObjectSpawner script
 void OnDespawn()
 {
     if (useClip)
     {
         AudioManager.Play3D(useClip, transform.position);
     }
     carrierId = new NetworkInstanceId(0);
     spawner.SetRespawn();
 }