obsidian/笔记文件/2.笔记/Gris角色运动的图像翻转.md
2025-03-26 00:02:56 +08:00

25 lines
598 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

这里是角色
![[Pasted image 20230703153125.png]]
上面的动画播放是这个组件控制的其中的Flip就是控制动画翻转相关的分别是x和y轴
![[Pasted image 20230703153148.png]]
这里就是获取到组件
![[Pasted image 20230703153233.png]]
然后还有一个浮点数值
![[Pasted image 20230703153311.png]]
在更新函数里,是通过监听水平输入,对这个浮点数值进行赋值操作
![[Pasted image 20230703153339.png]]
上面拿到的动画组件的flip布尔也是通过这个去修改就好
![[Pasted image 20230703153433.png]]