void halfHourUpdate()
{
Debug.Log("half hour has passed!");
}
void hourUpdate()
{
Debug.Log("HOur has passed");
}
/// <summary>
/// Set the base water level at the start and set up tide
/// water levels for day and night
/// </summary>
void Start()
{
// create night and day tide positions
this.nightPosition = this.dayPosition = this.transform.position;
this.dayPosition.y += this.TideSeverity + this.TideSeverity;
// subscribe precipitation updates to the clock
Game.Instance.ClockInstance.SecondUpdate += this.updatePrecipitationLevel;
Game.Instance.ClockInstance.HalfHourUpdate += this.halfHourUpdate;
Game.Instance.ClockInstance.HourUpdate += this.hourUpdate;
}
I just put this in floodwater.cs to test: