private void SetGoldenGoal(tnMatchSettingsModule i_Module)
    {
        if (i_Module == null)
        {
            return;
        }

        if (m_GoldenGoalSelector == null || m_GoldenGoalSelector.currentItem == null)
        {
            return;
        }

        int goldenGoalOptionId = m_GoldenGoalSelector.currentItem.id;

        i_Module.SetGoldenGoalOption(goldenGoalOptionId);

        LogManager.Log(this, LogContexts.FSM, "Golden Goal : " + m_GoldenGoalSelector.currentItem.label + " " + "[" + m_GoldenGoalSelector.currentItem.id + "]");
    }
        public override void OnEnter()
        {
            tnMatchSettingsModule module = GameModulesManager.GetModuleMain <tnMatchSettingsModule>();

            if (module == null)
            {
                module = GameModulesManager.AddModuleMain <tnMatchSettingsModule>();
            }

            module.Clear();

            module.SetGameModeId(gameModeId.Value);
            module.SetStadiumId(stadiumId.Value);
            module.SetBallId(ballId.Value);
            module.SetMatchDurationOption(matchDurationOption.Value);
            module.SetRefereeOption(refereeOption.Value);
            module.SetGoldenGoalOption(goldenGoalOption.Value);

            Finish();
        }
コード例 #3
0
    private void Internal_FillMatchSettingsModule()
    {
        tnMatchSettingsModule module = GameModulesManager.GetModuleMain <tnMatchSettingsModule>();

        if (module == null)
        {
            return;
        }

        string gameModeId            = GetGameModeId(m_GameMode);
        string ballId                = GetBallId(m_Ball);
        string stadiumId             = GetStadiumId(m_Stadium);
        string matchDurationOptionId = GetMatchDurationOptionId(m_MatchDuration);
        string goldenGoalOptionId    = GetGoldenGoalOptionId(m_GoldenGoal);
        string refereeOptionId       = GetRefereeOptionId(m_Referee);

        module.SetGameModeId(gameModeId);
        module.SetBallId(ballId);
        module.SetStadiumId(stadiumId);
        module.SetMatchDurationOption(matchDurationOptionId);
        module.SetGoldenGoalOption(goldenGoalOptionId);
        module.SetRefereeOption(refereeOptionId);
    }