控制播放动画片段.docxVIP

  • 0
  • 0
  • 约小于1千字
  • 约 2页
  • 2020-06-11 发布于山东
  • 举报
控制播放动画片段 Posted on 2013年07月04日 by U3d / \o 查看 Unity3D脚本/插件 中的全部文章 Unity3D脚本/插件 /被围观 66 次 控制播放动画片段 这里查看物体自带动画,并可以进行切割。 控制播放动画片段 Animation组件就是控制播放动画。 ?? ? 01 public const string ANIM_NAME0 = Take 001; 02 public const string ANIN_NAME1 = Take 0010; 03 private GameObject obj = null; 04 void Start () { 05 //Unity3D教程手册: 06 obj = GameObject.Find(yh_mx); 07 obj.animation.wrapMode = WrapMode.Default; 08 ? 09 } 10 ? 11 // Update is called once per frame 12 void Update () { 13 if(Input.GetKeyDown(KeyCode.A)) 14 { 15 obj.animation.Play(ANIM_NAME0); 16 ? 17 } 18 if(Input.GetKeyDown(KeyCode.B)) 19 { 20 obj.animation.Play(ANIN_NAME1); 21 }

文档评论(0)

1亿VIP精品文档

相关文档