void Awake() { _closeButton.onClick.AddListener(OnCloseClick); _mainMenuButton.onClick.AddListener(OnMainMenuClick); _restartButton.onClick.AddListener(OnRestartClick); _sceneController = ControllersBox.Get <ScenesController>(); }
public void OnInit() { _activeLevelBlocks = new List <LevelBlock>(); var lcc = ControllersBox.Get <LevelConfigController>(); var levelId = LevelController.CurrentLevel; _elementsGroups = lcc.Config.GetElementsGroups(levelId.Level); _levelBlocks = lcc.Config.LevelBlocks; for (var i = 0; i < MinCountBlocks; i++) { CreateNewBlock(false); } EventManager.Subscribe <PlayerIntoBlockTriggerEnter>(this, OnPlayerIntoBlockTriggerEnter); }
void OnStartClick() { var lc = ControllersBox.Get <LevelController>(); _sceneController?.OpenLevel(lc.CurrentLevel); }
void Awake() { _startGameButton.onClick.AddListener(OnStartClick); _sceneController = ControllersBox.Get <ScenesController>(); }
void Start() { var fcc = ControllersBox.Get <FoodsController>(); _foodCountText.text = fcc.CurrentFoodCount.ToString(); }
void OnClickNextLevel() { Hide(); ControllersBox.Get <LevelController>().CompleteLevel(); }