예제 #1
0
        // ================================================================================
        //  private methods
        // --------------------------------------------------------------------------------

        protected bool Init()
        {
            if (Instance != null)
            {
                return(false);
            }

            Instance = this;

            TextManagerInit textManagerInit = GetComponentInChildren <TextManagerInit>();

            if (textManagerInit != null)
            {
                textManagerInit.Init();
            }

            baseAudioManager    = GetComponent <BaseAudioManager>();
            baseNavigationInput = GetComponent <BaseNavigationInput>();
            messenger           = GetComponent <Messenger>();
            applicationInfo     = new ApplicationInfo();

            gamepadInput    = transform.GetInterface <IGamepadInput>();
            inputController = transform.GetInterface <IInputController>();

            // object shall persist through all levels
            DontDestroyOnLoad(gameObject);

            return(true);
        }
예제 #2
0
		// ================================================================================
		//  private methods
		// --------------------------------------------------------------------------------

		protected bool Init()
        {
            if (Instance != null)
            {
                return false;
            }

            Instance = this;

			TextManagerInit textManagerInit = GetComponentInChildren<TextManagerInit>();
			if (textManagerInit != null)
			{
				textManagerInit.Init();
			}

            baseAudioManager = GetComponent<BaseAudioManager>();
			baseNavigationInput = GetComponent<BaseNavigationInput>();
			messenger = GetComponent<Messenger>();
			applicationInfo = new ApplicationInfo();

			gamepadInput = transform.GetInterface<IGamepadInput>();
			inputController = transform.GetInterface<IInputController>();

			// object shall persist through all levels
			DontDestroyOnLoad(gameObject);

            return true;
        }