131 lines
3.5 KiB
C#
131 lines
3.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using UI;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x020000C7 RID: 199
|
|
public class KaleidxScopeTrackStartController : MonoBehaviour
|
|
{
|
|
// Token: 0x060006AE RID: 1710 RVA: 0x0001AE3C File Offset: 0x0001A03C
|
|
private void Awake()
|
|
{
|
|
this.animHashList.Add(Animator.StringToHash("Youth"));
|
|
this.animHashList.Add(Animator.StringToHash("Heaven"));
|
|
this.animHashList.Add(Animator.StringToHash("BlackRose"));
|
|
this.animHashList.Add(Animator.StringToHash("Dragon"));
|
|
this.animHashList.Add(Animator.StringToHash("Metro"));
|
|
this.animHashList.Add(Animator.StringToHash("Beginning"));
|
|
this.animHashList.Add(Animator.StringToHash("TS07"));
|
|
this.animHashList.Add(Animator.StringToHash("TS08"));
|
|
this.animHashList.Add(Animator.StringToHash("TS09"));
|
|
this.animHashList.Add(Animator.StringToHash("TS10"));
|
|
this.animHashList.Add(Animator.StringToHash("TS11"));
|
|
}
|
|
|
|
// Token: 0x060006AF RID: 1711 RVA: 0x0001AF30 File Offset: 0x0001A130
|
|
public void PlayAnimation(KaleidxScopeTrackStartController.AnimState animState)
|
|
{
|
|
if (animState < KaleidxScopeTrackStartController.AnimState.Kaleidx_01 || animState >= (KaleidxScopeTrackStartController.AnimState)this.animHashList.Count)
|
|
{
|
|
return;
|
|
}
|
|
if (!this.animator.gameObject.activeSelf)
|
|
{
|
|
this.animator.gameObject.SetActive(true);
|
|
}
|
|
this.animator.SetTrigger(this.animHashList[(int)animState]);
|
|
}
|
|
|
|
// Token: 0x060006B0 RID: 1712 RVA: 0x0001AF8A File Offset: 0x0001A18A
|
|
public void SetAnimSpeed(float speed)
|
|
{
|
|
this.animator.speed = speed;
|
|
}
|
|
|
|
// Token: 0x060006B1 RID: 1713 RVA: 0x0001AF98 File Offset: 0x0001A198
|
|
public bool PlayEnded()
|
|
{
|
|
return this.animator.GetCurrentAnimatorStateInfo(0).normalizedTime >= 1f;
|
|
}
|
|
|
|
// Token: 0x060006B2 RID: 1714 RVA: 0x0001AFC3 File Offset: 0x0001A1C3
|
|
public void SetTrackNum(uint num)
|
|
{
|
|
num -= 1U;
|
|
if ((ulong)num >= (ulong)((long)this.trackNum.MultiSprites.Count))
|
|
{
|
|
return;
|
|
}
|
|
this.trackNum.ChangeSprite((int)num);
|
|
}
|
|
|
|
// Token: 0x060006B3 RID: 1715 RVA: 0x0001AFEC File Offset: 0x0001A1EC
|
|
public void SetLife(int life)
|
|
{
|
|
this.lifeGaugeAnimator.SetTrigger("TS_normal_Loop");
|
|
string text = life.ToString("D000");
|
|
if (life > 999)
|
|
{
|
|
text = "999";
|
|
}
|
|
this.lifeNum.ChangeText(text);
|
|
if (life < 100)
|
|
{
|
|
this.lifeNum.FrameList[2].Scale = 0f;
|
|
this.lifeNum.FrameList[0].RelativePosition.x = 52f;
|
|
this.lifeNum.FrameList[1].RelativePosition.x = 24f;
|
|
if (life < 10)
|
|
{
|
|
this.lifeNum.FrameList[1].Scale = 0f;
|
|
this.lifeNum.FrameList[0].RelativePosition.x = 74f;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x04000508 RID: 1288
|
|
[SerializeField]
|
|
private Animator animator;
|
|
|
|
// Token: 0x04000509 RID: 1289
|
|
[SerializeField]
|
|
private Animator lifeGaugeAnimator;
|
|
|
|
// Token: 0x0400050A RID: 1290
|
|
[SerializeField]
|
|
private SpriteCounter lifeNum;
|
|
|
|
// Token: 0x0400050B RID: 1291
|
|
[SerializeField]
|
|
private MultipleImage trackNum;
|
|
|
|
// Token: 0x0400050C RID: 1292
|
|
private List<int> animHashList = new List<int>();
|
|
|
|
// Token: 0x020009AB RID: 2475
|
|
public enum AnimState
|
|
{
|
|
// Token: 0x0400613E RID: 24894
|
|
Kaleidx_01,
|
|
// Token: 0x0400613F RID: 24895
|
|
Kaleidx_02,
|
|
// Token: 0x04006140 RID: 24896
|
|
Kaleidx_03,
|
|
// Token: 0x04006141 RID: 24897
|
|
Kaleidx_04,
|
|
// Token: 0x04006142 RID: 24898
|
|
Kaleidx_05,
|
|
// Token: 0x04006143 RID: 24899
|
|
Kaleidx_06,
|
|
// Token: 0x04006144 RID: 24900
|
|
Kaleidx_07,
|
|
// Token: 0x04006145 RID: 24901
|
|
Kaleidx_08,
|
|
// Token: 0x04006146 RID: 24902
|
|
Kaleidx_09,
|
|
// Token: 0x04006147 RID: 24903
|
|
Kaleidx_10,
|
|
// Token: 0x04006148 RID: 24904
|
|
Kaleidx_11
|
|
}
|
|
}
|