255 lines
7.1 KiB
C#
255 lines
7.1 KiB
C#
using System;
|
|
using DB;
|
|
using MAI2.Util;
|
|
using Manager;
|
|
using Manager.MaiStudio;
|
|
using Manager.UserDatas;
|
|
using TMPro;
|
|
using UI;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x0200013C RID: 316
|
|
public class TimelineRoot : MonoBehaviour
|
|
{
|
|
// Token: 0x06000AAC RID: 2732 RVA: 0x0002D480 File Offset: 0x0002C680
|
|
public void Initialise(MusicData musicData, int monitorIndex)
|
|
{
|
|
int num = -1;
|
|
uint num2 = 0U;
|
|
uint num3 = 0U;
|
|
bool flag = false;
|
|
MusicClearrankID musicClearrankID = MusicClearrankID.Invalid;
|
|
PlayComboflagID playComboflagID = PlayComboflagID.None;
|
|
PlaySyncflagID playSyncflagID = PlaySyncflagID.None;
|
|
int num4 = GameManager.SelectDifficultyID[monitorIndex];
|
|
UserScore userScore = null;
|
|
Singleton<UserDataManager>.Instance.GetUserData((long)monitorIndex).ScoreDic[num4].TryGetValue(musicData.GetID(), out userScore);
|
|
if (userScore != null)
|
|
{
|
|
flag = true;
|
|
num = (int)userScore.achivement;
|
|
musicClearrankID = GameManager.GetClearRank(num, musicData.utagePlayStyle == UtagePlayStyle.DoublePlayerScore);
|
|
playComboflagID = userScore.combo;
|
|
playSyncflagID = userScore.sync;
|
|
num2 = userScore.deluxscore;
|
|
num3 = (uint)(musicData.notesData[num4].maxNotes * 3);
|
|
}
|
|
this._lv_Base.ChangeSprite(num4);
|
|
if (musicData.GetID() >= 100000)
|
|
{
|
|
this._lv_Base.ChangeSprite(10);
|
|
}
|
|
this._achivement_Base.ChangeSprite(flag ? 0 : 1);
|
|
this._clearRank_Base.ChangeSprite(flag ? 0 : 1);
|
|
if (num >= 0)
|
|
{
|
|
this._achivement_Text.gameObject.SetActive(true);
|
|
this._achivement_decimal_Text.gameObject.SetActive(true);
|
|
this._achivement_percent_Text.gameObject.SetActive(true);
|
|
int num5 = num / 10000;
|
|
this._achivement_Text.SetText(num5.ToString());
|
|
this._achivement_decimal_Text.SetText("." + num.ToString("0000000").Substring(3, 4));
|
|
}
|
|
else
|
|
{
|
|
this._achivement_Text.gameObject.SetActive(false);
|
|
this._achivement_decimal_Text.gameObject.SetActive(false);
|
|
this._achivement_percent_Text.gameObject.SetActive(false);
|
|
}
|
|
if (musicClearrankID != MusicClearrankID.Invalid)
|
|
{
|
|
this._clearRank_Image.gameObject.SetActive(true);
|
|
this._clearRank_Image.ChangeSprite((int)musicClearrankID);
|
|
}
|
|
else
|
|
{
|
|
this._clearRank_Image.gameObject.SetActive(false);
|
|
}
|
|
if (num2 != 0U)
|
|
{
|
|
this._deluxScore_Obj.SetActive(true);
|
|
this._deluxScore_Best.SetText(num2.ToString());
|
|
this._deluxScore_Max.SetText(num3.ToString());
|
|
this.SetDeluxScoreAnimation(num2, num3);
|
|
}
|
|
else
|
|
{
|
|
this._deluxScore_Obj.SetActive(false);
|
|
}
|
|
string str = musicData.notesData[num4].notesDesigner.str;
|
|
this.SetNotesDesignerName(num4, str);
|
|
this.SetBPM(musicData.bpm);
|
|
this._comboRank_Image.ChangeSprite((int)playComboflagID);
|
|
this._syncRank_Image.ChangeSprite((int)playSyncflagID);
|
|
Vector2 sizeDelta = this._noteDesignerName_Text.GetComponent<RectTransform>().sizeDelta;
|
|
this._noteDesignerName_Text.GetComponent<RectTransform>().sizeDelta = new Vector2(sizeDelta.x, sizeDelta.y + 4f);
|
|
this._notesDesignerTitle_Text.text = CommonMessageID.NotesDesignerTitle.GetName();
|
|
}
|
|
|
|
// Token: 0x06000AAD RID: 2733 RVA: 0x0002D72C File Offset: 0x0002C92C
|
|
private void SetDeluxScoreAnimation(uint dxScore, uint dxScoreMax)
|
|
{
|
|
this._deluxScore_BaseObj.SetActive(true);
|
|
this._deluxScore_StarObj.SetActive(true);
|
|
if (dxScoreMax == 0U)
|
|
{
|
|
this._deluxScore_Anim.Play("Star_None");
|
|
this._deluxScore_BaseObj.SetActive(false);
|
|
this._deluxScore_StarObj.SetActive(false);
|
|
return;
|
|
}
|
|
switch (GameManager.GetDeluxcoreRank((int)(dxScore * 100U / dxScoreMax)))
|
|
{
|
|
case DeluxcorerankrateID.Rank_00:
|
|
this._deluxScore_Anim.Play("Star_None");
|
|
this._deluxScore_BaseObj.SetActive(false);
|
|
this._deluxScore_StarObj.SetActive(false);
|
|
return;
|
|
case DeluxcorerankrateID.Rank_01:
|
|
this._deluxScore_Anim.Play("DXScore_01");
|
|
return;
|
|
case DeluxcorerankrateID.Rank_02:
|
|
this._deluxScore_Anim.Play("DXScore_02");
|
|
return;
|
|
case DeluxcorerankrateID.Rank_03:
|
|
this._deluxScore_Anim.Play("DXScore_03");
|
|
return;
|
|
case DeluxcorerankrateID.Rank_04:
|
|
this._deluxScore_Anim.Play("DXScore_04");
|
|
return;
|
|
case DeluxcorerankrateID.Rank_05:
|
|
this._deluxScore_Anim.Play("DXScore_05");
|
|
return;
|
|
default:
|
|
this._deluxScore_Anim.Play("Star_None");
|
|
this._deluxScore_BaseObj.SetActive(false);
|
|
this._deluxScore_StarObj.SetActive(false);
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000AAE RID: 2734 RVA: 0x0002D852 File Offset: 0x0002CA52
|
|
private void SetNotesDesignerName(int difficulty, string notesDesignerName)
|
|
{
|
|
if (this._noteDesignerName_Text != null)
|
|
{
|
|
if (difficulty <= 1 && notesDesignerName == "")
|
|
{
|
|
this._noteDesignerName_Text.SetData("-");
|
|
return;
|
|
}
|
|
this._noteDesignerName_Text.SetData(notesDesignerName);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000AAF RID: 2735 RVA: 0x0002D890 File Offset: 0x0002CA90
|
|
private void SetBPM(int bpm)
|
|
{
|
|
if (this._BPM_Text != null)
|
|
{
|
|
if (bpm >= 0)
|
|
{
|
|
this._BPM_Text.text = "BPM " + bpm.ToString("000");
|
|
return;
|
|
}
|
|
this._BPM_Text.text = "BPM ???";
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000AB0 RID: 2736 RVA: 0x0002D8E1 File Offset: 0x0002CAE1
|
|
private void Update()
|
|
{
|
|
this._noteDesignerName_Text.ViewUpdate();
|
|
}
|
|
|
|
// Token: 0x040008C9 RID: 2249
|
|
[Header("楽曲下地")]
|
|
[SerializeField]
|
|
private MultipleImage _lv_Base;
|
|
|
|
// Token: 0x040008CA RID: 2250
|
|
[Header("達成率")]
|
|
[SerializeField]
|
|
private MultipleImage _achivement_Base;
|
|
|
|
// Token: 0x040008CB RID: 2251
|
|
[SerializeField]
|
|
private TextMeshProUGUI _achivement_Text;
|
|
|
|
// Token: 0x040008CC RID: 2252
|
|
[SerializeField]
|
|
private TextMeshProUGUI _achivement_decimal_Text;
|
|
|
|
// Token: 0x040008CD RID: 2253
|
|
[SerializeField]
|
|
private TextMeshProUGUI _achivement_percent_Text;
|
|
|
|
// Token: 0x040008CE RID: 2254
|
|
[Header("クリアランク")]
|
|
[SerializeField]
|
|
private MultipleImage _clearRank_Base;
|
|
|
|
// Token: 0x040008CF RID: 2255
|
|
[SerializeField]
|
|
private MultipleImage _clearRank_Image;
|
|
|
|
// Token: 0x040008D0 RID: 2256
|
|
[Header("でらっくスコア")]
|
|
[SerializeField]
|
|
private GameObject _deluxScore_Obj;
|
|
|
|
// Token: 0x040008D1 RID: 2257
|
|
[SerializeField]
|
|
private GameObject _deluxScore_BaseObj;
|
|
|
|
// Token: 0x040008D2 RID: 2258
|
|
[SerializeField]
|
|
private GameObject _deluxScore_StarObj;
|
|
|
|
// Token: 0x040008D3 RID: 2259
|
|
[SerializeField]
|
|
private TextMeshProUGUI _deluxScore_Best;
|
|
|
|
// Token: 0x040008D4 RID: 2260
|
|
[SerializeField]
|
|
private TextMeshProUGUI _deluxScore_Max;
|
|
|
|
// Token: 0x040008D5 RID: 2261
|
|
[SerializeField]
|
|
private Animator _deluxScore_Anim;
|
|
|
|
// Token: 0x040008D6 RID: 2262
|
|
[Header("ノーツデザイナー名")]
|
|
[SerializeField]
|
|
private CustomTextScroll _noteDesignerName_Text;
|
|
|
|
// Token: 0x040008D7 RID: 2263
|
|
[Header("BPM")]
|
|
[SerializeField]
|
|
private TextMeshProUGUI _BPM_Text;
|
|
|
|
// Token: 0x040008D8 RID: 2264
|
|
[Header("コンボメダル")]
|
|
[SerializeField]
|
|
private MultipleImage _comboRank_Image;
|
|
|
|
// Token: 0x040008D9 RID: 2265
|
|
[Header("Syncメダル")]
|
|
[SerializeField]
|
|
private MultipleImage _syncRank_Image;
|
|
|
|
// Token: 0x040008DA RID: 2266
|
|
[Header("DBテキスト")]
|
|
[SerializeField]
|
|
private TextMeshProUGUI _notesDesignerTitle_Text;
|
|
|
|
// Token: 0x020009E7 RID: 2535
|
|
private enum TextureName
|
|
{
|
|
// Token: 0x0400624D RID: 25165
|
|
Played,
|
|
// Token: 0x0400624E RID: 25166
|
|
NoPlay
|
|
}
|
|
}
|