rolling boulders now obey to freeze
This commit is contained in:
parent
fffb50a6a2
commit
0e96d83445
|
@ -379,3 +379,4 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
speed: 2
|
||||
target: {fileID: 1157356545022895102}
|
||||
objectTimeScale: {fileID: 11400000, guid: 9b68e167db44c0c42837e9a679da964e, type: 2}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Ktyl.Util;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
@ -7,6 +8,7 @@ public class Mover : MonoBehaviour
|
|||
{
|
||||
[SerializeField] private float speed;
|
||||
[SerializeField] private GameObject target;
|
||||
[SerializeField] private SerialFloat objectTimeScale;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
|
@ -19,6 +21,6 @@ public class Mover : MonoBehaviour
|
|||
void FixedUpdate()
|
||||
{
|
||||
float dt = Time.fixedDeltaTime;
|
||||
transform.position += transform.forward * speed * dt;
|
||||
transform.position += transform.forward * speed * dt * objectTimeScale;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue