版权声明:本文为博主原创文章,未经博主允许不得转载。该博客所用图片资源均作学习分享用途,请勿用于商业行为。传播者自负。 如果本博客所写文章侵犯到您的权益,请主动联系留言,我们将及时删除相关内容。 https://blog.csdn.net/BuladeMian/article/details/82353946
虽然有些粗糙,但是大致实现的思路就是这样。接下来把UI优化,布置得细致一些即可。
using UnityEngine;
public class Test_UI001 : MonoBehaviour {
public Animator animator;
public void ButtonOn()
{
if (animator != null)
{
animator.Play("Test_Change", 0, 0f); ;
}
}
public void ButtonOff()
{
if (animator != null)
{
animator.Play("Idle", 0, 0f); ;
}
}
}
在上面的基础上对一些物体进行了一些设置
主要是Animator的改动