|
|
@ -147,11 +147,11 @@ public class Character : MonoBehaviour |
|
|
|
yield return new WaitForSeconds(0.05f); |
|
|
|
while (elapsedTime < time) |
|
|
|
{ |
|
|
|
transform.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time)); |
|
|
|
Current.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time)); |
|
|
|
yield return new WaitForEndOfFrame(); |
|
|
|
elapsedTime += Time.deltaTime; |
|
|
|
} |
|
|
|
transform.position = charEndPosition; |
|
|
|
Current.position = charEndPosition; |
|
|
|
} |
|
|
|
IEnumerator MoveConveyorBackwardCoroutine(Block Target, Transform Current, float time, float heightMax) |
|
|
|
{ |
|
|
@ -162,11 +162,11 @@ public class Character : MonoBehaviour |
|
|
|
yield return new WaitForSeconds(0.05f); |
|
|
|
while (elapsedTime < time) |
|
|
|
{ |
|
|
|
transform.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time)); |
|
|
|
Current.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time)); |
|
|
|
yield return new WaitForEndOfFrame(); |
|
|
|
elapsedTime += Time.deltaTime; |
|
|
|
} |
|
|
|
transform.position = charEndPosition; |
|
|
|
Current.position = charEndPosition; |
|
|
|
} |
|
|
|
IEnumerator MoveConveyorLeftCoroutine(Block Target, Transform Current, float time, float heightMax) |
|
|
|
{ |
|
|
@ -177,11 +177,11 @@ public class Character : MonoBehaviour |
|
|
|
yield return new WaitForSeconds(0.05f); |
|
|
|
while (elapsedTime < time) |
|
|
|
{ |
|
|
|
transform.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time)); |
|
|
|
Current.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time)); |
|
|
|
yield return new WaitForEndOfFrame(); |
|
|
|
elapsedTime += Time.deltaTime; |
|
|
|
} |
|
|
|
transform.position = charEndPosition; |
|
|
|
Current.position = charEndPosition; |
|
|
|
} |
|
|
|
IEnumerator MoveConveyorRightCoroutine(Block Target, Transform Current, float time, float heightMax) |
|
|
|
{ |
|
|
@ -192,11 +192,11 @@ public class Character : MonoBehaviour |
|
|
|
yield return new WaitForSeconds(0.05f); |
|
|
|
while (elapsedTime < time) |
|
|
|
{ |
|
|
|
transform.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time)); |
|
|
|
Current.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time)); |
|
|
|
yield return new WaitForEndOfFrame(); |
|
|
|
elapsedTime += Time.deltaTime; |
|
|
|
} |
|
|
|
transform.position = charEndPosition; |
|
|
|
Current.position = charEndPosition; |
|
|
|
} |
|
|
|
|
|
|
|
IEnumerator PushLeftCoroutine(Transform Current, float time) |
|
|
@ -208,11 +208,11 @@ public class Character : MonoBehaviour |
|
|
|
yield return new WaitForSeconds(0.05f); |
|
|
|
while (elapsedTime < time) |
|
|
|
{ |
|
|
|
transform.position = Vector3.Lerp(startPosition, endPosition, (elapsedTime / time)); |
|
|
|
Current.position = Vector3.Lerp(startPosition, endPosition, (elapsedTime / time)); |
|
|
|
yield return new WaitForEndOfFrame(); |
|
|
|
elapsedTime += Time.deltaTime; |
|
|
|
} |
|
|
|
transform.position = endPosition; |
|
|
|
Current.position = endPosition; |
|
|
|
} |
|
|
|
|
|
|
|
IEnumerator PushRightCoroutine(Transform Current, float time) |
|
|
@ -224,11 +224,11 @@ public class Character : MonoBehaviour |
|
|
|
yield return new WaitForSeconds(0.05f); |
|
|
|
while (elapsedTime < time) |
|
|
|
{ |
|
|
|
transform.position = Vector3.Lerp(startPosition, endPosition, (elapsedTime / time)); |
|
|
|
Current.position = Vector3.Lerp(startPosition, endPosition, (elapsedTime / time)); |
|
|
|
yield return new WaitForEndOfFrame(); |
|
|
|
elapsedTime += Time.deltaTime; |
|
|
|
} |
|
|
|
transform.position = endPosition; |
|
|
|
Current.position = endPosition; |
|
|
|
} |
|
|
|
|
|
|
|
IEnumerator MoveDownCoroutine(Block Target, Transform Current, float time, float heightMax) |
|
|
|