Merge branch '97-rolling-boulders-freeze' into 'main'
rolling boulders now obey to freeze Closes #97 See merge request kernel-panic/revival!62
This commit is contained in:
commit
abde0ea9af
|
@ -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