Beispiel #1
0
 void OnDestroy()
 {
     if (inst == this)
     {
         inst = null;
     }
 }
Beispiel #2
0
 void Awake()
 {
     inst                 = this;
     prevTime             = Time.realtimeSinceStartup;
     gameObject.hideFlags = HideFlags.HideInHierarchy;
     dt = 0f;
 }