Nextrek
Diff Revisions
141
vs
142
for /3DSpace/Assets/SpaceUnity/_Demo/Scrips/SU_Spaceship.cs
|
@@ -89,9 +89,10 @@ |
89 |
89 |
|
// Calculate where the position is in world space for the mount point |
90 |
90 |
|
Vector3 _pos = transform.position + transform.right * _wmp.x + transform.up * _wmp.y + transform.forward * _wmp.z; |
91 |
91 |
|
// Instantiate the laser prefab at position with the spaceships rotation |
92 |
|
- |
Transform _laserShot = (Transform) Instantiate(laserShotPrefab[weaponType], _pos, transform.rotation); |
93 |
92 |
|
// Specify which transform it was that fired this round so we can ignore it for collision/hit |
94 |
|
- |
_laserShot.GetComponent<SU_LaserShot>().firedBy = transform; |
|
93 |
+ |
//Transform _laserShot = (Transform) Instantiate(laserShotPrefab[weaponType], _pos, transform.rotation); |
|
94 |
+ |
//_laserShot.GetComponent<SU_LaserShot>().firedBy = transform; |
|
95 |
+ |
WeaponFireUtils.FireLaser(laserShotPrefab[weaponType], _pos, this.transform.rotation, this.gameObject, GameManager.ENEMY_TAG); |
95 |
96 |
|
} |
96 |
97 |
|
// Play sound effect when firing |
97 |
98 |
|
if (soundEffectFire[weaponType] != null) |