summaryrefslogtreecommitdiff
path: root/AlienSurvival/Assets/Test/Scripts/TestPeaceMakerGrenade.cs
diff options
context:
space:
mode:
Diffstat (limited to 'AlienSurvival/Assets/Test/Scripts/TestPeaceMakerGrenade.cs')
-rw-r--r--AlienSurvival/Assets/Test/Scripts/TestPeaceMakerGrenade.cs10
1 files changed, 2 insertions, 8 deletions
diff --git a/AlienSurvival/Assets/Test/Scripts/TestPeaceMakerGrenade.cs b/AlienSurvival/Assets/Test/Scripts/TestPeaceMakerGrenade.cs
index 109e47b..cd12c1e 100644
--- a/AlienSurvival/Assets/Test/Scripts/TestPeaceMakerGrenade.cs
+++ b/AlienSurvival/Assets/Test/Scripts/TestPeaceMakerGrenade.cs
@@ -15,7 +15,6 @@ public class TestPeaceMakerGrenade : MonoBehaviour
private Vector3 m_Velocity; // x, y, fakeHeight
-
/// <summary>
/// 设置初始参数,都在fake空间下
/// </summary>
@@ -25,10 +24,7 @@ public class TestPeaceMakerGrenade : MonoBehaviour
public void Set(Vector3 initPosition, Vector3 initDirection, float initSpeed)
{
m_Coords = GetComponent<TestFakeHeight>();
-
- m_Coords.x = initPosition.x;
- m_Coords.y = initPosition.y;
- m_Coords.height = initPosition.z;
+ m_Coords.position = initPosition;
m_Velocity = initDirection * initSpeed;
}
@@ -61,9 +57,7 @@ public class TestPeaceMakerGrenade : MonoBehaviour
GameObject exp = Instantiate<GameObject>(m_ExplosionEffect);
TestFakeHeight coord = exp.GetComponent<TestFakeHeight>();
- coord.x = m_Coords.x;
- coord.y = m_Coords.y;
- coord.height = m_Coords.height;
+ coord.position = m_Coords.position;
exp.SetActive(true);
}