Nextrek
Diff Revisions
141
vs
142
for /3DSpace/Assets/SpaceUnity/_Demo/Scrips/SU_LaserShot.cs
|
@@ -32,9 +32,17 @@ |
32 |
32 |
|
public Transform impactEffect; |
33 |
33 |
|
// Reference to explosion effect prefab to spawn if object is destroyed |
34 |
34 |
|
public Transform explosionEffect; |
|
35 |
+ |
|
35 |
36 |
|
// "Fired By" Reference to ignore collision detection for the ship that fired the laser |
36 |
|
- |
public Transform firedBy {get; set;} |
|
37 |
+ |
private Transform firedBy; |
|
38 |
+ |
private string targetTag; |
37 |
39 |
|
|
|
40 |
+ |
// "Fired By" Reference to ignore collision detection for the ship that fired the laser |
|
41 |
+ |
public void SetFiredBy(Transform who, string _targetTag) { |
|
42 |
+ |
firedBy = who; |
|
43 |
+ |
targetTag = _targetTag; |
|
44 |
+ |
} |
|
45 |
+ |
|
38 |
46 |
|
// Private variables |
39 |
47 |
|
private Vector3 _velocity; |
40 |
48 |
|
private Vector3 _newPos; |