AkiraPixelWind/Assets/Scripts/Main/UI/MainUI/PlayMotionHistoryUI.cs

82 lines
1.5 KiB
C#
Raw Normal View History

2023-01-14 23:17:58 +08:00
/*-------------------------------------------------------------------------------------
--- :
--- :
--- : 2023114
-------------------------------------------------------------------------------------*/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Game;
using TMPro;
using Axibug.Runtime;
namespace Game
{
/// <summary>
/// xx 功能界面
/// </summary>
public class PlayMotionHistoryUI : UIBase
{
//UIAutoBuild_CtrlDefine
public TextMeshProUGUI tmpInfo;
//UIAutoBuild_CtrlDefine
public override void Awake()
{
//UIAutoBuild_CtrlBind
base.Awake();
Transform tf = transform;
tmpInfo = tf.Find("BG/tmpInfo").GetComponent<TextMeshProUGUI>();
//UIAutoBuild_CtrlBind
}
void OnEnable()
{
//UIAutoBuild_EventReg
//UIAutoBuild_EventReg
}
void OnDisable()
{
//UIAutoBuild_EventUnReg
//UIAutoBuild_EventUnReg
}
void Start()
{
}
// 每次显示都执行, 可定义参数
public override void Show(params object[] _params)
{
base.Show(_params);
}
private void Update()
{
ReflushMotionInfo();
}
void ReflushMotionInfo()
{
string TempStr = "";
MontionkeyClass[] motionArr = GamePlayEntry.Input.mInputMotionData.GetAllHistory();
for (int i = 0; i < motionArr.Length; i++)
{
if (i > 0)
TempStr += " > ";
TempStr = motionArr[i].MontionType.ToString();
}
tmpInfo.text = TempStr;
}
}
}