コード例 #1
0
 void Awake()
 {
     if (intance == null)
     {
         intance = this;
     }
 }
コード例 #2
0
    void Awake()
    {
        if (!_instance)
        {
            _instance = this;
        }
        else
        {
            Destroy(gameObject);
        }

        DontDestroyOnLoad(gameObject);
    }
コード例 #3
0
ファイル: Globals.cs プロジェクト: Mathias1000/Arctium
 public static void InitializeManager()
 {
     ActionMgr         = ActionManager.GetInstance();
     AddonMgr          = AddonManager.GetInstance();
     SkillMgr          = SkillManager.GetInstance();
     SpellMgr          = SpellManager.GetInstance();
     SpecializationMgr = SpecializationManager.GetInstance();
     ItemMgr = ItemManager.GetInstance();
     DataMgr           = DataManager.GetInstance();
     SpawnMgr          = SpawnManager.GetInstance();
     GossipMgr         = GossipManager.GetInstance();
     ObjectMgr         = ObjectManager.GetInstance();
     WorldMgr          = WorldManager.GetInstance();
     LevelStatMgr      = LevelStatManager.GetInstance();
 }