fix compile errors
This commit is contained in:
parent
94959bcb71
commit
e2a4d6dd45
|
@ -1,9 +1,5 @@
|
||||||
using Ktyl.Util;
|
|
||||||
using System;
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
|
||||||
using DG.Tweening;
|
using DG.Tweening;
|
||||||
using Ktyl.Util;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
[RequireComponent(typeof(Rigidbody))]
|
[RequireComponent(typeof(Rigidbody))]
|
||||||
|
@ -51,10 +47,9 @@ public class FallawayFloor : MonoBehaviour
|
||||||
if (!_triggered.HasValue && other.CompareTag("Player"))
|
if (!_triggered.HasValue && other.CompareTag("Player"))
|
||||||
{
|
{
|
||||||
// Start the Destroy floor coroutine and switch to the dissolve material.
|
// Start the Destroy floor coroutine and switch to the dissolve material.
|
||||||
if (objectTimeScale != 0)
|
if (_settings.ObjectTimeScale != 0)
|
||||||
{
|
{
|
||||||
StartCoroutine(Fall());
|
StartCoroutine(Fall());
|
||||||
_renderer.material = dissolve;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -63,13 +58,12 @@ public class FallawayFloor : MonoBehaviour
|
||||||
//The platform gets destroyed after the player resumes frozen time on a platform
|
//The platform gets destroyed after the player resumes frozen time on a platform
|
||||||
private void OnTriggerStay(Collider other)
|
private void OnTriggerStay(Collider other)
|
||||||
{
|
{
|
||||||
if (!_triggered && other.CompareTag("Player"))
|
if (!_triggered.HasValue && other.CompareTag("Player"))
|
||||||
{
|
{
|
||||||
// Start the Destroy floor coroutine and switch to the dissolve material.
|
// Start the Destroy floor coroutine and switch to the dissolve material.
|
||||||
if (objectTimeScale != 0)
|
if (_settings.ObjectTimeScale != 0)
|
||||||
{
|
{
|
||||||
StartCoroutine(Fall());
|
StartCoroutine(Fall());
|
||||||
_renderer.material = dissolve;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,9 @@ public class TrapSettings : ScriptableObject
|
||||||
// how long the player has currently been safe for. -1 while the player is not
|
// how long the player has currently been safe for. -1 while the player is not
|
||||||
// in a safe zone
|
// in a safe zone
|
||||||
[SerializeField] private SerialFloat _safeTime;
|
[SerializeField] private SerialFloat _safeTime;
|
||||||
|
|
||||||
|
public float ObjectTimeScale => _objectTimeScale;
|
||||||
|
[SerializeField] private SerialFloat _objectTimeScale;
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public struct FallawayFloorSettings
|
public struct FallawayFloorSettings
|
||||||
|
|
|
@ -13,6 +13,7 @@ MonoBehaviour:
|
||||||
m_Name: Trap Settings
|
m_Name: Trap Settings
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
_safeTime: {fileID: 11400000, guid: 27c10a061baeec8469e96d4f995c1445, type: 2}
|
_safeTime: {fileID: 11400000, guid: 27c10a061baeec8469e96d4f995c1445, type: 2}
|
||||||
|
_objectTimeScale: {fileID: 11400000, guid: 9b68e167db44c0c42837e9a679da964e, type: 2}
|
||||||
_fallawayFloor:
|
_fallawayFloor:
|
||||||
_safeResetTime: 5
|
_safeResetTime: 5
|
||||||
_fmodEvent: event:/Environment/Traps/FallingPlatform
|
_fmodEvent: event:/Environment/Traps/FallingPlatform
|
||||||
|
|
Loading…
Reference in New Issue