博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
动画状态切换
阅读量:6913 次
发布时间:2019-06-27

本文共 468 字,大约阅读时间需要 1 分钟。

hot3.png

 

    Animator anim = this.GetComponent<Animator>();

    AnimatorStateInfo animatorInfo;

        animatorInfo = anim.GetCurrentAnimatorStateInfo(0);
        if (IsOk)
        {
           
            anim.SetTrigger(str);
        }

        if ((animatorInfo.normalizedTime > 1) && (animatorInfo.IsName(str)))

        {

            

            IsOk = true;
            //print("动画播放完了");
            GameManager._Instance.IsPlay = false;
            GameManager._Instance.OpenRay();

        }

        else
        {
            IsOk = false;
            GameManager._Instance.CloseRay();
            //print("动画正在播放中");
        }
        

        

    
 

转载于:https://my.oschina.net/u/2874878/blog/757082

你可能感兴趣的文章
使用Selenium抓取百度指数一
查看>>
python 日志工具 Dict4ini 的简单使用示例
查看>>
我的友情链接
查看>>
Java OOP初探
查看>>
Linux中配置ftp服务器
查看>>
DHCP 服务器 Server2003 到 Server 2012 迁移(一)
查看>>
shell中“2 > &1”的含义
查看>>
Puppet 源码安装篇
查看>>
Ignoring query to other database
查看>>
Centos6.4安装OTRS必须成功版!
查看>>
List,ArrayList,Map循环遍历
查看>>
我的友情链接
查看>>
objectclass and objectcategory
查看>>
常用模块自动化安装脚本
查看>>
我的友情链接
查看>>
SQL Server数据库优化方案
查看>>
Redis基础教程第2节 Redis和NoSql 介绍与应用场景
查看>>
vmstat
查看>>
Word 2003操作技巧之改变默认字体及恢复方法
查看>>
redux-form(V7.4.2)笔记(三)之Flow简介
查看>>