예제 #1
0
 void Awake() {
     viewManager = GetComponent<NetViewManager>();
     lock (LockObj) {
         if (instance == null) instance = this;
     }
 }
예제 #2
0
 private static PickupSpawner CreateInstance() {
     lock (LockObj) {
         if (applicationIsQuitting) return null;
         return instance ?? (instance = new GameObject("_PickupSpawner").AddComponent<PickupSpawner>());
     }
 }