Ejemplo n.º 1
0
 void MakeSingleton()
 {
     if (instance != null)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
 }
Ejemplo n.º 2
0
        void Start()
        {
            Instance = this;

            ObjectManager = gameObject.AddComponent <ObjectManager>();

            FlashLightController  = gameObject.AddComponent <FlashLightController>();
            InputController       = gameObject.AddComponent <InputController>();
            SelectionController   = gameObject.AddComponent <SelectionController>();
            WeaponController      = gameObject.AddComponent <WeaponController>();
            InteractionController = gameObject.AddComponent <InteractionController>();
            MasterSoundController = gameObject.AddComponent <MasterSoundController>();

            EnableDefaults();
        }