initializeIfNecessary() private method

private initializeIfNecessary ( ) : void
return void
Esempio n. 1
0
 public static Hero get() {
     if (_instance == null)
     {
         GameObject go = GameObject.Find(gameObjectName);
         if(null != go)
         {
             _instance = go.GetComponent<Hero>();
             if(null != _instance) {
                 _instance.initializeIfNecessary();
             }
         }
         else
         {
             Logger.Log("Hero::get couldn't find game object", Logger.Level.ERROR);
         }
     }
     return _instance;
 }
Esempio n. 2
0
 public static Hero get()
 {
     if (_instance == null)
     {
         GameObject go = GameObject.Find(gameObjectName);
         if (null != go)
         {
             _instance = go.GetComponent <Hero>();
             if (null != _instance)
             {
                 _instance.initializeIfNecessary();
             }
         }
         else
         {
             Logger.Log("Hero::get couldn't find game object", Logger.Level.ERROR);
         }
     }
     return(_instance);
 }