Merge branch '98-arrow-wall-freeze' into 'main'

Resolve "freeze: arrow wall"

Closes #98

See merge request kernel-panic/revival!63
This commit is contained in:
Cat Flynn 2021-04-13 14:56:02 +00:00
commit 3646aa5825
2 changed files with 5 additions and 1 deletions

View File

@ -4853,6 +4853,7 @@ MonoBehaviour:
_settings: {fileID: 11400000, guid: 36275776eda5c8249bf45e01721afe36, type: 2} _settings: {fileID: 11400000, guid: 36275776eda5c8249bf45e01721afe36, type: 2}
_particles: {fileID: 2019849038189154255} _particles: {fileID: 2019849038189154255}
_killbox: {fileID: 6149521019687114910} _killbox: {fileID: 6149521019687114910}
objectTimeScale: {fileID: 11400000, guid: 9b68e167db44c0c42837e9a679da964e, type: 2}
--- !u!1001 &7614645943771473734 --- !u!1001 &7614645943771473734
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -1,3 +1,4 @@
using Ktyl.Util;
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
@ -14,6 +15,8 @@ public class ArrowWall : MonoBehaviour
private float? _triggered = null; private float? _triggered = null;
[SerializeField] private SerialFloat objectTimeScale;
public void Trigger() public void Trigger()
{ {
// TODO: pressure plate 'click' sound // TODO: pressure plate 'click' sound
@ -29,7 +32,7 @@ public class ArrowWall : MonoBehaviour
var elapsed = Time.time - _triggered.Value; var elapsed = Time.time - _triggered.Value;
// TODO: implications for time freeze // TODO: implications for time freeze
if (elapsed > _delay) if (elapsed > _delay && objectTimeScale!=0)
{ {
// TODO: arrow whoosh noises // TODO: arrow whoosh noises