Пример #1
0
    private void Awake()
    {
        gameManager = this;

        CheckForIntersceneManager();
        intersceneManagerInstance.GetQuestsIntersceneManagement.ResetQuests();
        intersceneManagerInstance.GetQuestsIntersceneManagement.AssignNewQuests();

        if (gameScroller != null)
        {
            gameScroller.SetUp(player);
        }

        poolingManager.CreatePoolsQueuesAndDictionary();

        player.GetRelatedDamageableComponent.OnLifeAmountChanged += playerUI.UpdateLifeBarFillAmount;
        questCheckingManager.OnValuesChanged += playerUI.UpdateProgressionTexts;

        OnStartGame += gameScroller.StartScroller;
        OnStartGame += playerUI.HideStartPanel;

        OnGameOver += gameScroller.StopScroller;
        OnGameOver += playerUI.ShowGameOverPanel;

        playerUI.ShowStartPanel();
        player.GetShootingSystem.OnWeaponChanged += playerUI.UpdateWeaponText;

        currentGameState = GameState.Starting;

        playerUI.OpenQuestsFrames(intersceneManagerInstance.GetQuestsIntersceneManagement.GetCurrentQuests);

        player.GetShootingSystem.SetUpWeaponSets(intersceneManagerInstance.GetQuestsIntersceneManagement.GetAllUnlockedWeapons);
    }