using System; using System.Collections; using System.Collections.Generic; using BITKit; using NodeCanvas.Framework; using Pinwheel.Jupiter; using UnityEngine; namespace Net.Like.Xue.Tokyo { public class SetDayTime:MonoBehaviour { private JDayNightCycle _cycle; private void Start() { _cycle = GetComponent(); Data.AddListener("Time",OnSetTime); destroyCancellationToken.Register(Dispose); } private void Dispose() { Data.RemoveListender("Time",OnSetTime); } private void Update() { Data.Set("Time", _cycle.Time); } private void OnSetTime(float obj) { _cycle.Time = obj; } } }