22 lines
408 B
C#
22 lines
408 B
C#
using UnityEngine;
|
|
|
|
public class WeatherZoneExample_C : MonoBehaviour
|
|
{
|
|
public GameObject uniStormSystem;
|
|
|
|
public int zoneWeather = 1;
|
|
|
|
private void Start()
|
|
{
|
|
uniStormSystem = GameObject.Find("UniStormSystemEditor");
|
|
}
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.tag == "Player")
|
|
{
|
|
uniStormSystem.GetComponent<UniStormWeatherSystem_C>().weatherForecaster = zoneWeather;
|
|
}
|
|
}
|
|
}
|