Пример #1
0
		public override void Start ()
		{
			Maze.Instance.Init();

            heroProxy = ApplicationFacade.Instance.RetrieveProxy<HeroProxy>();
            heroProxy.Init();
			blockProxy = ApplicationFacade.Instance.RetrieveProxy<BlockProxy>();
			blockProxy.Init();
            hallProxy = ApplicationFacade.Instance.RetrieveProxy<HallProxy>();
			monsterProxy = ApplicationFacade.Instance.RetrieveProxy<MonsterProxy>();
			bulletProxy = ApplicationFacade.Instance.RetrieveProxy<BulletProxy>();
			npcProxy = ApplicationFacade.Instance.RetrieveProxy<NPCProxy>();
			explorationProxy = ApplicationFacade.Instance.RetrieveProxy<ExplorationProxy>();
			battleProxy = ApplicationFacade.Instance.RetrieveProxy<BattleProxy>();

            PreloadAssets(IDManager.Instance.GetID(IDType.Maze, 1));

			ApplicationFacade.Instance.DispatchNotification(NotificationEnum.BATTLE_UI_INIT);
            ApplicationFacade.Instance.DispatchNotification(NotificationEnum.HERO_INIT, heroProxy.Record);
            if (Hero.Instance.Info.IsInHall)
                ApplicationFacade.Instance.DispatchNotification(NotificationEnum.HALL_INIT, hallProxy.Record);
            else
                ApplicationFacade.Instance.DispatchNotification(NotificationEnum.BLOCK_INIT);
			ApplicationFacade.Instance.DispatchNotification(NotificationEnum.NPC_INIT);
			ApplicationFacade.Instance.DispatchNotification(NotificationEnum.ENVIRONMENT_INIT);

			Game.Instance.Looper.SetAllActive(true);

            InputManager.Instance.Init();
            InputManager.Instance.SetKeyboardAction(KeyboardActionType.MazeMap, () =>
                {
                    ApplicationFacade.Instance.DispatchNotification(NotificationEnum.MAZE_MAP_SHOW);
                });

            //For test
            ApplicationFacade.Instance.RetrieveProxy<PackProxy>().Init();
		}
Пример #2
0
		public override void OnRegister ()
		{
			explorationProxy = ApplicationFacade.Instance.RetrieveProxy<ExplorationProxy>();
		}