Example #1
0
    public void Construct(ILevelLoaderService levelLoaderService, IPhysicalObjectFactory physicalObjectFactory)
    {
        this.physicalObjectFactory = physicalObjectFactory;
        this.levelLoaderService    = levelLoaderService;

        SubscribeToPhysicalObjectFactory();
    }
Example #2
0
    public FacebookWrapper(ILevelLoaderService levelLoaderService)
    {
        FB.Init(
            () => FB.ActivateApp(),
            shown => Time.timeScale = shown ? 1 : 0
            );

        levelLoaderService.onNextLevel += HandleNextLevelEvent;
    }
Example #3
0
        protected virtual void Awake()
        {
            Debug.Log(("Level: " + LevelName + " loaded").Colored(Colors.lightblue));

            levelService = ServiceLocator.GetService <ILevelLoaderService>();
            audioService = ServiceLocator.GetService <IAudioService>();
            uiService    = ServiceLocator.GetService <IUIService>();

            levelState = LevelState.Loaded;
        }
Example #4
0
    public void Construct(IWeaponFactory weaponFactory,
                          GameUIViewFactory gameUiViewFactory,
                          BlockContainer blockContainer,
                          ILevelLoaderService levelLoaderService)
    {
        this.levelLoaderService = levelLoaderService;
        this.blockContainer     = blockContainer;

        ui = gameUiViewFactory.Create();

        weaponFactory.Load();

        weapon = weaponFactory.Create();

        Subscribe();

        ConfigureAttacksCount();

        SetupUI();
    }
Example #5
0
        protected override void mapBindings()
        {
            base.mapBindings();
            var gameConfig = Resources.Load <GameConfigModel>(Utility.GameConfigResource);

            injectionBinder.Bind <IGameConfigModel>().ToValue(gameConfig).CrossContext();
            baseLoaderService  = CreateLoaderService(gameConfig);
            levelLoaderService = CreateLevelLoaderService();
            injectionBinder.Bind <ILoaderService>().ToValue(baseLoaderService).CrossContext();
            injectionBinder.Bind <ILevelLoaderService>().ToValue(levelLoaderService);

            updateService = new UpdateService();
            timeService   = new SmoothTimeService();
            injectionBinder.Bind <IUpdateService>().ToValue(updateService).CrossContext();
            injectionBinder.Bind <ITimeService>().ToValue(timeService).CrossContext();
            injectionBinder.Bind <IResourceLoaderService>().To <ResourceLoaderService>().ToSingleton().CrossContext();

            injectionBinder.Bind <ResourceRequestModel>().To <ResourceRequestModel>();
            injectionBinder.Bind <IPool <ResourceRequestModel> >().To <Pool <ResourceRequestModel> >().ToSingleton();

            injectionBinder.Bind <AssetsReadySignal>().ToSingleton().CrossContext();
        }
Example #6
0
 public void Construct(ILevelLoaderService levelLoaderService)
 {
     this.levelLoaderService = levelLoaderService;
 }
Example #7
0
 public void Construct(ILevelLoaderService levelLoaderService)
 {
     transform.Find("Level Text").GetComponent <Text>().text = "LVL " + (levelLoaderService.CurrentLevel + 1);
 }