Nextrek
Diff Revisions
167
vs
168
for /3DSpace/Assets/Custum/Scripts/AllyShip.cs
|
@@ -51,7 +51,7 @@ |
51 |
51 |
|
} |
52 |
52 |
|
} |
53 |
53 |
|
|
54 |
|
- |
_cacheRigidbody = rigidbody; |
|
54 |
+ |
_cacheRigidbody = GetComponent<Rigidbody>(); |
55 |
55 |
|
if (_cacheRigidbody == null) |
56 |
56 |
|
{ |
57 |
57 |
|
Debug.LogError("Spaceship has no rigidbody - the thruster scripts will fail. Add rigidbody component to the spaceship."); |
|
@@ -138,7 +138,7 @@ |
138 |
138 |
|
} |
139 |
139 |
|
if (soundEffectFire[weaponType] != null) |
140 |
140 |
|
{ |
141 |
|
- |
audio.PlayOneShot(soundEffectFire[weaponType]); |
|
141 |
+ |
GetComponent<AudioSource>().PlayOneShot(soundEffectFire[weaponType]); |
142 |
142 |
|
} |
143 |
143 |
|
} |
144 |
144 |
|
} |