initializeIfNecessary() private method

private initializeIfNecessary ( bool onlyIfEmpty = true ) : void
onlyIfEmpty bool
return void
コード例 #1
0
ファイル: MemoryManager.cs プロジェクト: afaucher17/Hero.Coli
 public static MemoryManager get()
 {
     if (_instance == null)
     {
         Logger.Log("MemoryManager::get was badly initialized", Logger.Level.WARN);
         _instance = GameObject.Find(gameObjectName).GetComponent <MemoryManager>();
         if (null != _instance)
         {
             DontDestroyOnLoad(_instance.gameObject);
             _instance.initializeIfNecessary();
         }
         else
         {
             Logger.Log("MemoryManager::get couldn't find game object", Logger.Level.ERROR);
         }
     }
     return(_instance);
 }
コード例 #2
0
ファイル: MemoryManager.cs プロジェクト: CyberCRI/Hero.Coli
 public static MemoryManager get()
 {
     if (_instance == null)
     {
         Logger.Log("MemoryManager::get was badly initialized", Logger.Level.WARN);
         _instance = GameObject.Find(gameObjectName).GetComponent<MemoryManager>();
         if (null != _instance)
         {
             DontDestroyOnLoad(_instance.gameObject);
             _instance.initializeIfNecessary();
         }
         else
         {
             Logger.Log("MemoryManager::get couldn't find game object", Logger.Level.ERROR);
         }
     }
     return _instance;
 }