void CalcCorePlayData()
    {
        CorePlayData.BMPDelta = CorePlayData.CurrentSong.BPM / 60f / 2f;
        m_CurrentTB           = 60f / CorePlayData.CurrentSong.BPM;
        while (m_CurrentTB < 0.5f || m_CurrentTB > 1)
        {
            if (m_CurrentTB < 0.5f)
            {
                m_CurrentTB *= 2f;
            }
            else if (m_CurrentTB > 1)
            {
                m_CurrentTB /= 2f;
            }
        }
        CorePlayData.TB = m_CurrentTB;

        m_RhythmBeatInterval = 60000f / CorePlayData.CurrentSong.BPM;
        Debug.LogWarning("m_RhythmBeatInterval coreplay: " + m_RhythmBeatInterval);

        //计算分数
        int levelNum = StaticData.LevelID - RuntimeConst.LevelBase;

        m_SongMaxScoreInfo = BeatmapParse.GetSongObjectMaxScore(CorePlayData.CurrentSong);
        int currentMaxScore = m_SongMaxScoreInfo.MaxScore;

        m_AllWordNum = m_SongMaxScoreInfo.MaxCombo;
        float destScore = (Mathf.Log10(levelNum) + RuntimeConst.ScoreAddOnParam) * CorePlayData.FirstLevelMaxScore;

        m_ScoreParam = destScore / currentMaxScore;
        PageManager.Instance.CurrentPage.GetNode <CalculateNode>().levelMaxScore = currentMaxScore;
        PageManager.Instance.CurrentPage.GetNode <CalculateNode>().scoreParam    = m_ScoreParam;
        PageManager.Instance.CurrentPage.GetNode <BossWarNode>().scoreParam      = m_ScoreParam;
        //Debug.Log(m_ScoreParam);
    }
Beispiel #2
0
    public static void CalcFirstLevelScore()
    {
        LevelData firstLevelData = LevelConfig.AllLevelDic[RuntimeConst.FirstLevelID];
        string    scriptName     = SongConfig.Instance.GetsongScriptBySongIDAndLevelDiffculty(LanguageManager.GetSongIdFromLanguage(firstLevelData.songID), firstLevelData.LevelDifficulty);

        SongObject firstSongObj = BeatmapParse.Parse(scriptName);

        FirstLevelMaxScore = BeatmapParse.GetSongObjectMaxScore(firstSongObj).MaxScore;
    }