Nextrek
Diff Revisions 167 vs 168 for /3DSpace/Assets/Custum/Scripts/LaunchMissile.cs
@@ -19,7 +19,7 @@ | |||
19 | 19 | WeaponFireUtils.FireMissile(missile, startPos.position, heroSpaceShip.transform.rotation, heroSpaceShip.gameObject, GameManager.ENEMY_TAG); | |
20 | 20 | if(soundEffect!=null) | |
21 | 21 | { | |
22 | - | audio.PlayOneShot(soundEffect); | |
22 | + | GetComponent<AudioSource>().PlayOneShot(soundEffect); | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | bullets.bullets_n--; |