Files
3d-bxqz/Assets/OpenTheWaterGate/CrestWater.cs
2026-05-06 17:36:41 +08:00

33 lines
693 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CrestWater : MonoBehaviour
{
public GameObject source;
public MonoBehaviour CrestShallowWaterSimulation;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
Debug.Log(transform.position.y);
if (transform.position.y > 16.7f)
{
source.SetActive(true);
CrestShallowWaterSimulation.enabled = true;
}
else
{
source.SetActive(false);
CrestShallowWaterSimulation.enabled = false;
}
}
}