474 lines
13 KiB
C#
474 lines
13 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using DB;
|
|
using Manager;
|
|
using Monitor.MusicSelect.ChainList;
|
|
using Monitor.MusicSelect.UI;
|
|
using Process;
|
|
using TMPro;
|
|
using UI;
|
|
using UI.DaisyChainList;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
// Token: 0x020000F7 RID: 247
|
|
public class MenuCardObject : ChainObject
|
|
{
|
|
// Token: 0x170000EF RID: 239
|
|
// (get) Token: 0x060007E5 RID: 2021 RVA: 0x0001E5D5 File Offset: 0x0001D7D5
|
|
// (set) Token: 0x060007E6 RID: 2022 RVA: 0x0001E5DD File Offset: 0x0001D7DD
|
|
public MusicChainCardObejct MusicCardObject { get; private set; }
|
|
|
|
// Token: 0x170000F0 RID: 240
|
|
// (get) Token: 0x060007E7 RID: 2023 RVA: 0x0001E5E6 File Offset: 0x0001D7E6
|
|
// (set) Token: 0x060007E8 RID: 2024 RVA: 0x0001E5EE File Offset: 0x0001D7EE
|
|
public MatchingChainCardObject MatchingCardObject { get; private set; }
|
|
|
|
// Token: 0x170000F1 RID: 241
|
|
// (get) Token: 0x060007E9 RID: 2025 RVA: 0x0001E5F7 File Offset: 0x0001D7F7
|
|
// (set) Token: 0x060007EA RID: 2026 RVA: 0x0001E5FF File Offset: 0x0001D7FF
|
|
public TrialCardObject TrialCardObject { get; private set; }
|
|
|
|
// Token: 0x060007EB RID: 2027 RVA: 0x0001E608 File Offset: 0x0001D808
|
|
protected override void Awake()
|
|
{
|
|
base.Awake();
|
|
this.MusicCardObject = Object.Instantiate<MusicChainCardObejct>(this._originalMusicChainCardObejct, this._MusicChainCardParent);
|
|
this.MatchingCardObject = Object.Instantiate<MatchingChainCardObject>(this._originalMatchingChainCardObejct, this._MatchingChainCardParent);
|
|
this.TrialCardObject = Object.Instantiate<TrialCardObject>(this._originalTrialChainCardObejct, this._TrialChainCardParent);
|
|
this._suggestOptionObject = Object.Instantiate<GameObject>(this._suggestOptionPrefab, this._suggestOptionParent);
|
|
this._volText.text = CommonMessageID.MusicSelectOptionVol.GetName();
|
|
}
|
|
|
|
// Token: 0x060007EC RID: 2028 RVA: 0x0001E68C File Offset: 0x0001D88C
|
|
public void Initialize(MusicSelectProcess.MenuType menuType, int trialPlayIndex)
|
|
{
|
|
this._rect = new Rect(0f, 0f, 1f, 1f);
|
|
for (int i = 0; i < this._menuObjectList.Count; i++)
|
|
{
|
|
if (i != (int)menuType)
|
|
{
|
|
this._menuObjectList[i].SetActive(false);
|
|
}
|
|
}
|
|
for (int j = 0; j < this._rightButtonAnimators.Length; j++)
|
|
{
|
|
if (this._rightButtonAnimators[j].gameObject.activeInHierarchy)
|
|
{
|
|
this._rightButtonAnimators[j].Rebind();
|
|
this._rightButtonAnimators[j].Play("Loop");
|
|
this._duration = this._rightButtonAnimators[j].GetCurrentAnimatorStateInfo(0).length * 1000f;
|
|
}
|
|
if (this._leftButtonAnimators[j].gameObject.activeInHierarchy)
|
|
{
|
|
this._leftButtonAnimators[j].Rebind();
|
|
this._leftButtonAnimators[j].Play("Loop");
|
|
}
|
|
}
|
|
this.TrialCardObject.Initialize(trialPlayIndex);
|
|
this._type = menuType;
|
|
}
|
|
|
|
// Token: 0x060007ED RID: 2029 RVA: 0x0001E79C File Offset: 0x0001D99C
|
|
public MusicSelectProcess.MenuType GetMenuType()
|
|
{
|
|
return this._type;
|
|
}
|
|
|
|
// Token: 0x060007EE RID: 2030 RVA: 0x0001E7A4 File Offset: 0x0001D9A4
|
|
public override void OnCenterIn()
|
|
{
|
|
switch (this._type)
|
|
{
|
|
case MusicSelectProcess.MenuType.Option:
|
|
case MusicSelectProcess.MenuType.Volume:
|
|
{
|
|
int type = (int)this._type;
|
|
if (this._menuObjectList[type].activeSelf)
|
|
{
|
|
this._cardAnimators[type].SetTrigger("OnCenterIn");
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
if (this.MusicCardObject.gameObject.activeSelf)
|
|
{
|
|
this.MusicCardObject.OnCenterIn();
|
|
}
|
|
}
|
|
|
|
// Token: 0x060007EF RID: 2031 RVA: 0x0001E824 File Offset: 0x0001DA24
|
|
public override void OnCenterOut()
|
|
{
|
|
switch (this._type)
|
|
{
|
|
case MusicSelectProcess.MenuType.Option:
|
|
case MusicSelectProcess.MenuType.Volume:
|
|
{
|
|
int type = (int)this._type;
|
|
if (this._menuObjectList[type].activeSelf)
|
|
{
|
|
this._cardAnimators[type].SetTrigger("OnCenterOut");
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
if (this.MusicCardObject.gameObject.activeSelf)
|
|
{
|
|
this.MusicCardObject.OnCenterOut();
|
|
}
|
|
if (this.MatchingCardObject.gameObject.activeSelf)
|
|
{
|
|
this.MatchingCardObject.OnCenterOut();
|
|
}
|
|
}
|
|
|
|
// Token: 0x060007F0 RID: 2032 RVA: 0x0001E8BE File Offset: 0x0001DABE
|
|
public override void ResetChain()
|
|
{
|
|
MusicChainCardObejct musicCardObject = this.MusicCardObject;
|
|
if (musicCardObject != null)
|
|
{
|
|
musicCardObject.ResetChain();
|
|
}
|
|
MatchingChainCardObject matchingCardObject = this.MatchingCardObject;
|
|
if (matchingCardObject == null)
|
|
{
|
|
return;
|
|
}
|
|
matchingCardObject.ResetChain();
|
|
}
|
|
|
|
// Token: 0x060007F1 RID: 2033 RVA: 0x0001E8E1 File Offset: 0x0001DAE1
|
|
public void ChangeOptionCard(OptionKindID kind)
|
|
{
|
|
this._optionCard.ChangeState(kind);
|
|
}
|
|
|
|
// Token: 0x060007F2 RID: 2034 RVA: 0x0001E8F0 File Offset: 0x0001DAF0
|
|
public void SetVolume(OptionHeadphonevolumeID volume, float volumeAmount)
|
|
{
|
|
int num = int.Parse(volume.GetName());
|
|
if (num >= 10)
|
|
{
|
|
this._volumeCounter[0].gameObject.SetActive(false);
|
|
this._volumeCounter[1].gameObject.SetActive(true);
|
|
this._volumeCounter[1].ChangeText(string.Concat(num));
|
|
}
|
|
else
|
|
{
|
|
this._volumeCounter[0].gameObject.SetActive(true);
|
|
this._volumeCounter[1].gameObject.SetActive(false);
|
|
this._volumeCounter[0].ChangeText(string.Concat(num));
|
|
}
|
|
this._volumeGauge.fillAmount = volumeAmount;
|
|
}
|
|
|
|
// Token: 0x060007F3 RID: 2035 RVA: 0x0001E998 File Offset: 0x0001DB98
|
|
public override void ViewUpdate(float syncTimer)
|
|
{
|
|
this._normalizeTime += (float)GameManager.GetGameMSecAdd();
|
|
float num = this._normalizeTime / this._duration;
|
|
MultiImage[] dotBackImages = this._dotBackImages;
|
|
for (int i = 0; i < dotBackImages.Length; i++)
|
|
{
|
|
dotBackImages[i].UVScale = this._rect;
|
|
}
|
|
this._rect.x = syncTimer;
|
|
for (int j = 0; j < this._rightButtonAnimators.Length; j++)
|
|
{
|
|
if (this._rightButtonAnimators[j].gameObject.activeInHierarchy)
|
|
{
|
|
this._rightButtonAnimators[j].SetFloat("SyncTimer", num);
|
|
}
|
|
if (this._leftButtonAnimators[j].gameObject.activeInHierarchy)
|
|
{
|
|
this._leftButtonAnimators[j].SetFloat("SyncTimer", num);
|
|
}
|
|
}
|
|
if (num > 1f)
|
|
{
|
|
this._normalizeTime = 0f;
|
|
}
|
|
if (this._isHold && (float)GameManager.GetGameMSec() - this._lastTime > 200f)
|
|
{
|
|
this._isHold = false;
|
|
for (int k = 0; k < this._rightButtonAnimators.Length; k++)
|
|
{
|
|
if (this._rightButtonAnimators[k].gameObject.activeInHierarchy)
|
|
{
|
|
this._rightButtonAnimators[k].SetTrigger("Loop");
|
|
}
|
|
if (this._leftButtonAnimators[k].gameObject.activeInHierarchy)
|
|
{
|
|
this._leftButtonAnimators[k].SetTrigger("Loop");
|
|
}
|
|
}
|
|
}
|
|
if (this.MusicCardObject.gameObject.activeSelf)
|
|
{
|
|
this.MusicCardObject.ViewUpdate(syncTimer);
|
|
}
|
|
if (this.TrialCardObject.gameObject.activeSelf)
|
|
{
|
|
this.TrialCardObject.ViewUpdate(syncTimer);
|
|
}
|
|
base.ViewUpdate(syncTimer);
|
|
}
|
|
|
|
// Token: 0x060007F4 RID: 2036 RVA: 0x0001EB3C File Offset: 0x0001DD3C
|
|
public void PressedButton(Direction direction)
|
|
{
|
|
this._lastTime = (float)GameManager.GetGameMSec();
|
|
if (direction == Direction.Right)
|
|
{
|
|
foreach (Animator animator in this._rightButtonAnimators)
|
|
{
|
|
if (animator.gameObject.activeInHierarchy)
|
|
{
|
|
if (this._isHold)
|
|
{
|
|
animator.SetTrigger(Animator.StringToHash("Hold"));
|
|
}
|
|
else
|
|
{
|
|
this._isHold = true;
|
|
animator.SetTrigger("Pressed");
|
|
}
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
foreach (Animator animator2 in this._leftButtonAnimators)
|
|
{
|
|
if (animator2.gameObject.activeInHierarchy)
|
|
{
|
|
if (this._isHold)
|
|
{
|
|
animator2.SetTrigger("Hold");
|
|
}
|
|
else
|
|
{
|
|
this._isHold = true;
|
|
animator2.SetTrigger("Pressed");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x060007F5 RID: 2037 RVA: 0x0001EBFC File Offset: 0x0001DDFC
|
|
public void SetSpeed(string speed)
|
|
{
|
|
TextMeshProUGUI[] speedText = this._speedText;
|
|
for (int i = 0; i < speedText.Length; i++)
|
|
{
|
|
speedText[i].text = CommonMessageID.MusicSelectOptionMenuSpeed.GetName() + speed;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060007F6 RID: 2038 RVA: 0x0001EC33 File Offset: 0x0001DE33
|
|
public void SetCustomDetils(string mirror, string trackSkip)
|
|
{
|
|
this._detilsText.text = string.Concat(new string[]
|
|
{
|
|
CommonMessageID.MusicSelectOptionMenuMirror.GetName(),
|
|
mirror,
|
|
"\n",
|
|
CommonMessageID.MusicSelectOptionMenuTrackSkip.GetName(),
|
|
trackSkip
|
|
});
|
|
}
|
|
|
|
// Token: 0x060007F7 RID: 2039 RVA: 0x0001EC6F File Offset: 0x0001DE6F
|
|
public void SetTrialData(int index, bool isLeftButtonActive, bool isRightButtonActive)
|
|
{
|
|
this.TrialCardObject.ChangeButton(index, isLeftButtonActive, isRightButtonActive);
|
|
}
|
|
|
|
// Token: 0x060007F8 RID: 2040 RVA: 0x0001EC7F File Offset: 0x0001DE7F
|
|
public void PressedTrialButton(Direction direction, bool toOut)
|
|
{
|
|
this.TrialCardObject.PressedButton(direction, toOut);
|
|
}
|
|
|
|
// Token: 0x060007F9 RID: 2041 RVA: 0x0001EC8E File Offset: 0x0001DE8E
|
|
public void SetTrialDisableReason(string text)
|
|
{
|
|
this.TrialCardObject.SetImpossibleText(text);
|
|
}
|
|
|
|
// Token: 0x060007FA RID: 2042 RVA: 0x0001EC9C File Offset: 0x0001DE9C
|
|
public void SetTrialActiveSize(bool isBig)
|
|
{
|
|
this.TrialCardObject.SetActiveSize(isBig);
|
|
}
|
|
|
|
// Token: 0x060007FB RID: 2043 RVA: 0x0001ECAC File Offset: 0x0001DEAC
|
|
public void SetCharacterSelectMessage(bool isActive, string message)
|
|
{
|
|
this._characterSelectMessage.text = message;
|
|
this._characterSelectMessage.color = (isActive ? this._textActiveColor : this._textDeactivateColor);
|
|
this._characterSelectMessage.outlineColor = (isActive ? Color.white : this._textOutlineDeactivateColor);
|
|
this._dotBackImage.color = (isActive ? this._dotBackActiveColor : this._dotBackDeactivateColor);
|
|
this._dotImage.color = (isActive ? this._dotActiveColor : this._dotDeactivateColor);
|
|
}
|
|
|
|
// Token: 0x060007FC RID: 2044 RVA: 0x0001ED39 File Offset: 0x0001DF39
|
|
public void SetActiveSuggestOption(bool isActive)
|
|
{
|
|
this._suggestOptionObject.SetActive(isActive);
|
|
}
|
|
|
|
// Token: 0x060007FD RID: 2045 RVA: 0x0001ED47 File Offset: 0x0001DF47
|
|
public void StartKaleidThirdTrackAnim(Action playPreviewAction, Action playSEAction)
|
|
{
|
|
this.MusicCardObject.StartKaleidThirdTrackAnim("UI_KLD_MSS_ThirdTrack", playPreviewAction, playSEAction);
|
|
}
|
|
|
|
// Token: 0x0400060B RID: 1547
|
|
private MusicSelectProcess.MenuType _type;
|
|
|
|
// Token: 0x0400060C RID: 1548
|
|
[SerializeField]
|
|
private List<GameObject> _menuObjectList;
|
|
|
|
// Token: 0x0400060D RID: 1549
|
|
[SerializeField]
|
|
private List<Animator> _cardAnimators;
|
|
|
|
// Token: 0x0400060E RID: 1550
|
|
[SerializeField]
|
|
[Header("キャラクターセレクト")]
|
|
private TextMeshProUGUI _characterSelectMessage;
|
|
|
|
// Token: 0x0400060F RID: 1551
|
|
[SerializeField]
|
|
private Image _dotBackImage;
|
|
|
|
// Token: 0x04000610 RID: 1552
|
|
[SerializeField]
|
|
private Image _dotImage;
|
|
|
|
// Token: 0x04000611 RID: 1553
|
|
[SerializeField]
|
|
private Color _dotBackActiveColor = Color.white;
|
|
|
|
// Token: 0x04000612 RID: 1554
|
|
[SerializeField]
|
|
private Color _dotActiveColor = Color.white;
|
|
|
|
// Token: 0x04000613 RID: 1555
|
|
[SerializeField]
|
|
private Color _dotBackDeactivateColor = Color.white;
|
|
|
|
// Token: 0x04000614 RID: 1556
|
|
[SerializeField]
|
|
private Color _dotDeactivateColor = Color.white;
|
|
|
|
// Token: 0x04000615 RID: 1557
|
|
[SerializeField]
|
|
private Color _textActiveColor = Color.white;
|
|
|
|
// Token: 0x04000616 RID: 1558
|
|
[SerializeField]
|
|
private Color _textDeactivateColor = Color.white;
|
|
|
|
// Token: 0x04000617 RID: 1559
|
|
[SerializeField]
|
|
private Color _textOutlineDeactivateColor;
|
|
|
|
// Token: 0x04000618 RID: 1560
|
|
[SerializeField]
|
|
[Header("Volume")]
|
|
private Image _volumeGauge;
|
|
|
|
// Token: 0x04000619 RID: 1561
|
|
[SerializeField]
|
|
private TextMeshProUGUI _volumeText;
|
|
|
|
// Token: 0x0400061A RID: 1562
|
|
[SerializeField]
|
|
private SpriteCounter[] _volumeCounter;
|
|
|
|
// Token: 0x0400061B RID: 1563
|
|
[SerializeField]
|
|
[Header("オプションカード")]
|
|
private OptionCardGroupObject _optionCard;
|
|
|
|
// Token: 0x0400061C RID: 1564
|
|
[SerializeField]
|
|
private TextMeshProUGUI[] _speedText;
|
|
|
|
// Token: 0x0400061D RID: 1565
|
|
[SerializeField]
|
|
private TextMeshProUGUI _detilsText;
|
|
|
|
// Token: 0x0400061E RID: 1566
|
|
[SerializeField]
|
|
[Header("カードボタン")]
|
|
private Animator[] _rightButtonAnimators;
|
|
|
|
// Token: 0x0400061F RID: 1567
|
|
[SerializeField]
|
|
private Animator[] _leftButtonAnimators;
|
|
|
|
// Token: 0x04000620 RID: 1568
|
|
[SerializeField]
|
|
[Header("どっとUVスクロール")]
|
|
private MultiImage[] _dotBackImages;
|
|
|
|
// Token: 0x04000621 RID: 1569
|
|
[SerializeField]
|
|
private Transform _MusicChainCardParent;
|
|
|
|
// Token: 0x04000622 RID: 1570
|
|
[SerializeField]
|
|
private Transform _MatchingChainCardParent;
|
|
|
|
// Token: 0x04000623 RID: 1571
|
|
[SerializeField]
|
|
private Transform _TrialChainCardParent;
|
|
|
|
// Token: 0x04000624 RID: 1572
|
|
[SerializeField]
|
|
private MusicChainCardObejct _originalMusicChainCardObejct;
|
|
|
|
// Token: 0x04000625 RID: 1573
|
|
[SerializeField]
|
|
private MatchingChainCardObject _originalMatchingChainCardObejct;
|
|
|
|
// Token: 0x04000626 RID: 1574
|
|
[SerializeField]
|
|
private TrialCardObject _originalTrialChainCardObejct;
|
|
|
|
// Token: 0x04000627 RID: 1575
|
|
[SerializeField]
|
|
private TextMeshProUGUI _volText;
|
|
|
|
// Token: 0x04000628 RID: 1576
|
|
[SerializeField]
|
|
private Transform _suggestOptionParent;
|
|
|
|
// Token: 0x04000629 RID: 1577
|
|
[SerializeField]
|
|
private GameObject _suggestOptionPrefab;
|
|
|
|
// Token: 0x0400062A RID: 1578
|
|
private GameObject _suggestOptionObject;
|
|
|
|
// Token: 0x0400062E RID: 1582
|
|
private float _duration;
|
|
|
|
// Token: 0x0400062F RID: 1583
|
|
private float _normalizeTime;
|
|
|
|
// Token: 0x04000630 RID: 1584
|
|
private float _lastTime;
|
|
|
|
// Token: 0x04000631 RID: 1585
|
|
private bool _isHold;
|
|
|
|
// Token: 0x04000632 RID: 1586
|
|
private Rect _rect;
|
|
}
|