Пример #1
0
        IEnumerator InitializeInternal()
        {
            initialized = true;
            Instance = this;
            DontDestroyOnLoad(this);

            ThreadingBridge.Initialize();

            // for webgl we cannot use custom attributes to find classes, so we rely on a delegate to create the logic instance for us.

            Initialize();

            #if UNITY_WEBGL
            webGLHelper = this.AddComponentIfNotExists<WebGLPlatformHelper>();
            #endif

            gameOptions = this.AddComponentIfNotExists<GameOptions>();
            gameMusic = this.AddComponentIfNotExists<GameMusic>();
            gameLoca = this.AddComponentIfNotExists<GameLocalization>();
            gameLoca.Initialize();
            gameInput = this.AddComponentIfNotExists<GameInput>();
            sceneTransition = this.AddComponentIfNotExists<SceneTransition>();

            objectPool = new ObjectPool();

            yield return new WaitForEndOfFrame();

            GameSetupReady();
        }
Пример #2
0
        public void Initialize(TouchInformation[] touches, GameInput inputSystem)
        {
            RelatedTouches = touches;

            this.InputSystem = inputSystem;
        }