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:
Cat Flynn 2021-04-13 15:03:47 +00:00
commit abde0ea9af
2 changed files with 4 additions and 1 deletions

View File

@ -379,3 +379,4 @@ MonoBehaviour:
m_EditorClassIdentifier:
speed: 2
target: {fileID: 1157356545022895102}
objectTimeScale: {fileID: 11400000, guid: 9b68e167db44c0c42837e9a679da964e, type: 2}

View File

@ -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;
}
}