Ejemplo n.º 1
0
        void InitBackButtonService()
        {
            //TODO: Move back button binding elsewhere (needs to be under a gameobject because of its update function)
            StrangeRoot       strangeRoot       = GameApplication.Instance.ModuleContainer.Get <StrangeRoot>();
            BackButtonService backButtonService = strangeRoot.GameRoot.gameObject.AddComponent <BackButtonService>();

            IInjector injector = strangeRoot.MainContext.injectionBinder.injector;

            injector.binder.Bind <IBackButtonService>().ToValue(backButtonService).CrossContext();
        }
Ejemplo n.º 2
0
        public override void Execute()
        {
//			Logger.LogDebug("StartCommand","Execute");

            IGameApplication container = GameApplication.Instance;

            _gameStateModel.StartGame();

            //game controlelrs
            GameObject pGameControllers = UnityEngine.GameObject.Instantiate(Resources.Load("CocoMainController", typeof(GameObject))) as GameObject;

            pGameControllers.transform.parent = GameApplication.Instance.Transform;

            BackButtonService pBackButtonService = GameObject.FindObjectOfType <BackButtonService> ();

            injectionBinder.Bind <BackButtonService> ().ToValue(pBackButtonService).CrossContext();
        }