Unity 动画系统-Animation
来源:互联网 发布:修复微信闪退的软件 编辑:程序博客网 时间:2024/05/21 17:01
动画系统 - Animation的基本属性 代码示例
public class AniceshiDemo : MonoBehaviour { Animation ani; //声明Animatio 类型// Use this for initializationvoid Start () { ani = GetComponent<Animation>(); Debug.Log("当前播放的动画剪辑是:" + ani.clip); Debug.Log("是否有任意动画在播放:" + ani.isPlaying); Debug.Log("返回指定名称的动画状态:" + ani["walk"]); Debug.Log("获取该动画的剪辑数量:" + ani.GetClipCount()); Debug.Log("是否有名为()的在播放:" + ani.IsPlaying("walk")); AnimationState anistate = ani["walk"]; //通过this[name]的形式,获取一个 动画状态 Debug.Log(anistate.name); //该剪辑的名字和长度 Debug.Log(anistate.length); }// Update is called once per framevoid Update () { if (Input.GetKeyDown(KeyCode.Q)) { ani.Play("walk"); //播放walk动作 } if (Input.GetKeyDown(KeyCode.R)) { Debug.Log("成功移除剪辑"); ani.RemoveClip("walk"); //移除某个剪辑 (参数可以是String类型,或者AnimationClip类型) } if (Input.GetKeyDown(KeyCode.S)) { ani.Rewind("walk"); //倒回 (参数可以是String类型,或者不传参数) } }}
阅读全文
1 0
- Unity 动画系统-Animation
- unity animation动画效果
- Unity之Animation动画
- Unity/Animation -- 添加动画事件(Animation Events)
- Unity之Animation动画制作
- unity3d Animation 动画系统
- Unity之Animation编辑器编辑动画
- Unity-Animation动画曲线弯曲问题
- Unity3d之Animation(动画系统)
- Unity3d之Animation(动画系统)
- Unity3d之Animation(动画系统)
- Unity动画系统
- Unity Avatar动画系统
- Unity旧版动画系统
- Unity 动画系统-AnimationEvent
- Unity 动画系统-Mecanim
- Unity 动画系统出错
- Unity动画系统入门
- chrome://命令大全
- MySQL数据库索引的4大类型以及相关的索引创建
- Gradle 使用指南 -- 创建Plugin
- 《统计学习方法》学习笔记-概论
- bounding box regression
- Unity 动画系统-Animation
- APK反编译及防护技术
- 用原生的JS封装cookie的操作方法
- 深度学习:python的安装
- POJ
- poj 3734 Blocks【矩阵快速幂染色】
- springboot自带的日志打印如何写
- nodejs 安装问题
- 简单FTP服务器搭建教程