MoTaForPSVita/Assets/Scripts/Controller/UI/InfoImageController.cs

29 lines
581 B
C#
Raw Permalink Normal View History

using System.Collections;
2024-04-30 17:39:50 +08:00
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class InfoImageController : MonoBehaviour
{
private Animator _animator;
private Text _infoText;
private void Awake()
{
_animator = GetComponent<Animator>();
_infoText = GetComponentInChildren<Text>();
}
public void SetText(string text)
{
_animator = GetComponent<Animator>();
_infoText = GetComponentInChildren<Text>();
_infoText.text = text;
2024-04-30 17:39:50 +08:00
}
public void DestroySelf()
{
Destroy(gameObject);
}
}