Initial commit
This commit is contained in:
1 parent
ee9615239e
commit
16feac691f
4093 files changed
+1030491
No files matched your search
@@ -0,0 +1,40 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Gaia
|
||||
{
|
||||
public class DisableUnderwaterFXTrigger : MonoBehaviour
|
||||
{
|
||||
public string m_tagCheck = "Player";
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.tag == m_tagCheck)
|
||||
{
|
||||
if (GaiaUnderwaterEffects.Instance != null)
|
||||
{
|
||||
GaiaUnderwaterEffects.Instance.EnableUnderwaterEffects = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (other.tag == m_tagCheck)
|
||||
{
|
||||
if (GaiaUnderwaterEffects.Instance != null)
|
||||
{
|
||||
GaiaUnderwaterEffects.Instance.EnableUnderwaterEffects = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadTagFromGaia()
|
||||
{
|
||||
CharacterController controller = FindObjectOfType<CharacterController>();
|
||||
if (controller != null)
|
||||
{
|
||||
m_tagCheck = controller.tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user