直接贴代码
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Test : MonoBehaviour
{
public Animator mAni;
public bool ison=false;
public void PlayMybock1()
{
if (ison == false)
{
mAni.SetBool("NewBool", true);
mAni.SetBool("NewBools", true);
ison = true;
}
else
{
mAni.SetBool("NewBool", false);
mAni.SetBool("NewBools", false);
ison = false;
}
}
}
示例图
网友评论