58 lines
1.1 KiB
C#
58 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class YaliMoLi : MonoBehaviour
|
|
{
|
|
[Tooltip("ÌØÐ§ÎïÌå")]
|
|
public GameObject TeXiaoObj;
|
|
[Tooltip("Åç»ðÁ£×Ó")]
|
|
public ParticleSystem HuoParticle;
|
|
|
|
private Material m_yanMat;
|
|
|
|
public Image[] AllImgs;
|
|
public Sprite[] AllSprites;
|
|
|
|
public TextMeshProUGUI TextMPU;
|
|
|
|
|
|
private void Awake()
|
|
{
|
|
}
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
HuoParticle.Stop();
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public void StartToChange()
|
|
{
|
|
TeXiaoObj.SetActive(true);
|
|
HuoParticle.Play();
|
|
|
|
AllImgs[0].sprite = AllSprites[1];
|
|
AllImgs[1].sprite = AllSprites[2];
|
|
TextMPU.text = "¿ª";
|
|
}
|
|
|
|
public void EndToChange()
|
|
{
|
|
TeXiaoObj.SetActive(false);
|
|
HuoParticle.Stop();
|
|
|
|
AllImgs[0].sprite = AllSprites[0];
|
|
AllImgs[1].sprite = AllSprites[3];
|
|
TextMPU.text = "¹Ø";
|
|
}
|
|
}
|