Commit d47ca545 authored by wanqing's avatar wanqing

第五关卡优化

parent a3a5073f
......@@ -71,6 +71,7 @@ public class FifthLevelTrigger : MonoBehaviour
public Transform m_buildTrans;
public Transform m_buttonTrans;
public float m_speed = 1.0f;
public float m_upSpeed = 4.0f;
private bool m_bControl = true;
protected virtual void OnTriggerEnter(Collider collider)
{
......@@ -89,8 +90,8 @@ public class FifthLevelTrigger : MonoBehaviour
}
if (m_buildTrans.localPosition.y <= 10.1f)
{
m_buildTrans.Translate(Vector3.up * Time.deltaTime * m_speed, Space.World);
m_targetTrans.Translate(Vector3.up * Time.deltaTime * m_speed, Space.World);
m_buildTrans.Translate(Vector3.up * Time.deltaTime * m_upSpeed, Space.World);
m_targetTrans.Translate(Vector3.up * Time.deltaTime * m_upSpeed, Space.World);
}
}
}
......
......@@ -6,7 +6,7 @@ public class TargetTrigger : MonoBehaviour
{
public float m_speed = 0.1f;
private Vector3 m_pos = new Vector3(-1.61f, 0.22f, 0);
private Vector3 m_posLevelFive = new Vector3(-1.61f, 10.24f, 0);
private Vector3 m_posLevelFive = new Vector3(-1.61f, 10.35f, 0);
private Quaternion m_rotation = Quaternion.identity;
private bool m_bControl = true;
private Transform m_targetTrans;
......
......@@ -3776,6 +3776,7 @@ MonoBehaviour:
m_buildTrans: {fileID: 4035800303001616775}
m_buttonTrans: {fileID: 1871549070046122665}
m_speed: 1
m_upSpeed: 4
--- !u!1001 &1871120857418378013
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -3868,6 +3869,11 @@ PrefabInstance:
propertyPath: m_LocalPosition.x
value: -2.9
objectReference: {fileID: 0}
- target: {fileID: 2883321869090243963, guid: 54c939b922ce3e742b9aecc128cdd154,
type: 3}
propertyPath: m_LocalScale.y
value: 0.05
objectReference: {fileID: 0}
- target: {fileID: 2986675907246666288, guid: 54c939b922ce3e742b9aecc128cdd154,
type: 3}
propertyPath: m_Name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment