コード例 #1
0
 public void Deinitilize()
 {
     if (_timeObject != null)
     {
         _timeObject.OnTimeUpdateHandler -= TimeUpdate;
         _timeObject.OnForwardHandler    -= OnForward;
         _timeObject.OnBackwardHandler   -= OnBackward;
         _timeObject.OnPauseHandler      -= OnPause;
         _timeObject = null;
     }
 }
コード例 #2
0
 public void Initilize()
 {
     if (_timeObject == null)
     {
         _timeObject = gameObject.GetComponent <TimeObjectComponent>();
         _timeObject.OnTimeUpdateHandler += TimeUpdate;
         _timeObject.OnForwardHandler    += OnForward;
         _timeObject.OnBackwardHandler   += OnBackward;
         _timeObject.OnPauseHandler      += OnPause;
     }
 }