Animator动画按钮拆分播放
2019-04-24 本文已影响0人
李昀熹1112
直接贴代码
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;
}
}
}
示例图