

unity用代码怎样实现状态的改变
,4 年前
发布于技术交流
0
private Animator animator; public bool a = false; // Start is called before the first frame update void Start() { animator = GetComponent<Animator>(); }
// Update is called once per frame void Update() { if (Input.GetKey(KeyCode.A)) { animator.SetBool("001", a); } else { animator.SetBool("001", !a); }
怎样改代码可以实现按下A键a的值变为true,再按一下变为false
181 次浏览
评论 0
1个回答
2
懒人写法

,4 年前回答
评论 2

问
AI
全新AI功能上线
1. 基于Unity微调:专为Unity优化,提供精准高效的支持。
2. 深度集成:内置于团结引擎,随时查阅与学习。
3. 多功能支持:全面解决技术问题与学习需求。

问
AI