Exemplo n.º 1
0
 private void Awake()
 {
     if (singleton != null)
     {
         Debug.LogWarning("Destroying old singleton!", singleton.gameObject);
         Object.Destroy(singleton);
     }
     singleton = this;
     exists    = true;
 }
 private void Awake()
 {
     if (InterpTimedEventSyncronizer.singleton)
     {
         Debug.LogWarning("Destroying old singleton!", InterpTimedEventSyncronizer.singleton.gameObject);
         UnityEngine.Object.Destroy(InterpTimedEventSyncronizer.singleton);
     }
     InterpTimedEventSyncronizer.singleton = this;
     InterpTimedEventSyncronizer.exists    = true;
 }
 private void Awake()
 {
     if (InterpTimedEventSyncronizer.singleton)
     {
         Debug.LogWarning("Destroying old singleton!", InterpTimedEventSyncronizer.singleton.gameObject);
         UnityEngine.Object.Destroy(InterpTimedEventSyncronizer.singleton);
     }
     InterpTimedEventSyncronizer.singleton = this;
     InterpTimedEventSyncronizer.exists = true;
 }
Exemplo n.º 4
0
 private void OnDestroy()
 {
     if (singleton == this)
     {
         try
         {
             InterpTimedEvent.Clear(false);
         }
         finally
         {
             singleton = null;
             exists    = false;
         }
     }
 }
 private void OnDestroy()
 {
     if (InterpTimedEventSyncronizer.singleton == this)
     {
         try
         {
             InterpTimedEvent.Clear(false);
         }
         finally
         {
             InterpTimedEventSyncronizer.singleton = null;
             InterpTimedEventSyncronizer.exists    = false;
         }
     }
 }
 private void OnDestroy()
 {
     if (InterpTimedEventSyncronizer.singleton == this)
     {
         try
         {
             InterpTimedEvent.Clear(false);
         }
         finally
         {
             InterpTimedEventSyncronizer.singleton = null;
             InterpTimedEventSyncronizer.exists = false;
         }
     }
 }