|
|
@ -17,7 +17,7 @@ public class PlatformMover : MonoBehaviour |
|
|
|
// Update is called once per frame
|
|
|
|
void Update() |
|
|
|
{ |
|
|
|
transform.position = Vector2.Lerp(m_StartPos.position, m_EndPos.position, Mathf.PingPong(Time.deltaTime * m_Duration, 1.0f)); |
|
|
|
transform.position = Vector2.Lerp(m_StartPos.position, m_EndPos.position, (Mathf.Sin(Time.time * m_Duration) + 1.0f) / 2.0f); |
|
|
|
} |
|
|
|
|
|
|
|
#if UNITY_EDITOR
|
|
|
|