add project files
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using UnityEngine;
|
||||
using OHM.UnityToolkit;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
public class ThresholdRichZone : MonoBehaviour
|
||||
{
|
||||
public int thresholdToPass;
|
||||
|
||||
[SerializeField]
|
||||
[FormerlySerializedAs("fxPass")]
|
||||
private FX _fxPass;
|
||||
|
||||
[SerializeField]
|
||||
[FormerlySerializedAs("fxLoose")]
|
||||
private FX _fxLoose;
|
||||
|
||||
[SerializeField]
|
||||
private Transform spawnFx;
|
||||
|
||||
public bool isUse { get; private set; }
|
||||
|
||||
public void TryTakeThePass(bool canPass)
|
||||
{
|
||||
isUse = true;
|
||||
FX fx = (canPass ? _fxPass : _fxLoose);
|
||||
if (fx != null)
|
||||
{
|
||||
fx.PlayInstance(spawnFx, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user