コード例 #1
0
 private void OnDestroy()
 {
     if (Tracker != null)
     {
         CoinsForChangeTracker tracker = Tracker;
         tracker.OnCoinCountUpdated = (Action <long>)Delegate.Remove(tracker.OnCoinCountUpdated, new Action <long>(onTotalCoinsUpdated));
     }
 }
コード例 #2
0
 private void Start()
 {
     if (Tracker != null)
     {
         SetCoinCount(Tracker.CurrentCoinCount, immediate: true);
         CoinsForChangeTracker tracker = Tracker;
         tracker.OnCoinCountUpdated = (Action <long>)Delegate.Combine(tracker.OnCoinCountUpdated, new Action <long>(onTotalCoinsUpdated));
     }
 }
コード例 #3
0
 public void SetTracker(CoinsForChangeTracker tracker)
 {
     if (!(Tracker != null))
     {
         if (tracker == null)
         {
             base.enabled = false;
             return;
         }
         Tracker = tracker;
         SetCoinCount(Tracker.CurrentCoinCount, immediate: true);
         CoinsForChangeTracker tracker2 = Tracker;
         tracker2.OnCoinCountUpdated = (Action <long>)Delegate.Combine(tracker2.OnCoinCountUpdated, new Action <long>(onTotalCoinsUpdated));
     }
 }
コード例 #4
0
 public void Init(CoinsForChangeStation station, CoinsForChangeTracker tracker)
 {
     coinsForChangeStation = station;
     Counter.SetTracker(tracker);
 }