75 lines
1.6 KiB
C#
75 lines
1.6 KiB
C#
|
/*-------------------------------------------------------------------------------------
|
||
|
--- 创建人:
|
||
|
--- 描 述:
|
||
|
--- 创建时间: 2023年1月14日
|
||
|
-------------------------------------------------------------------------------------*/
|
||
|
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 ScenesTipsUI : UIBase
|
||
|
{
|
||
|
//UIAutoBuild_CtrlDefine
|
||
|
public TextMeshProUGUI tmpTitle;
|
||
|
public TextMeshProUGUI tmpSubTitle;
|
||
|
//UIAutoBuild_CtrlDefine
|
||
|
public Animator Anim;
|
||
|
public RectTransform rectTransform;
|
||
|
|
||
|
|
||
|
public override void Awake()
|
||
|
{
|
||
|
//UIAutoBuild_CtrlBind
|
||
|
base.Awake();
|
||
|
Transform tf = transform;
|
||
|
tmpTitle = tf.Find("BG/tmpTitle").GetComponent<TextMeshProUGUI>();
|
||
|
tmpSubTitle = tf.Find("BG/tmpSubTitle").GetComponent<TextMeshProUGUI>();
|
||
|
//UIAutoBuild_CtrlBind
|
||
|
Anim = tf.GetComponent<Animator>();
|
||
|
rectTransform = this.GetComponent<RectTransform>();
|
||
|
}
|
||
|
|
||
|
void OnEnable()
|
||
|
{
|
||
|
//UIAutoBuild_EventReg
|
||
|
//UIAutoBuild_EventReg
|
||
|
}
|
||
|
|
||
|
void OnDisable()
|
||
|
{
|
||
|
//UIAutoBuild_EventUnReg
|
||
|
//UIAutoBuild_EventUnReg
|
||
|
}
|
||
|
|
||
|
void Start()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
// 每次显示都执行, 可定义参数
|
||
|
public override void Show(params object[] _params)
|
||
|
{
|
||
|
base.Show(_params);
|
||
|
tmpTitle.text = _params[0].ToString();
|
||
|
tmpSubTitle.text = _params[1].ToString();
|
||
|
Anim.Play("ShowScenesAnim");
|
||
|
Invoke("EndEff", Anim.GetCurrentAnimatorStateInfo(0).length);
|
||
|
}
|
||
|
|
||
|
|
||
|
public void EndEff()
|
||
|
{
|
||
|
this.gameObject.SetActive(false);
|
||
|
}
|
||
|
}
|
||
|
}
|