Animation 优化
来源:互联网 发布:日本海关数据 编辑:程序博客网 时间:2024/05/19 18:48
优化:动画,先判断是否是应经加载过了 如果是的话就不要再继续加载了,做一下判断--防止重复加载
local animation = display.getAnimationCache(plistName)if animation then return animation end<span style="white-space:pre"></span>选中未被选中的状态改变,选中执行动画每次选择都要做一个判断self.hero:stopAllActions()if _isChoose then <span style="white-space:pre"></span>-- 资源加载local plistName<span style="white-space:pre"></span>-- 1 技能动画 2 做无限战力动画else<span style="white-space:pre"></span>-- 未被选择 -<span style="white-space:pre"></span>- 小黑人、 停止动画、 变成第一帧战力继续优化重复选择动画一直做,可设置状态等动画做完了,按钮才能点击 self.hero:stopAllActions()self.hero:setColor(cc.c3b(0,0,0))self.hero:setSpriteFrame(self.heroId.."_stand_0000.png")end按钮不可被点击设置:-- btn:setButtonEnabled(false)
0 0
- Animation 优化
- Instruments性能优化-Core Animation
- Instruments性能优化-Core Animation
- Instruments性能优化-Core Animation
- Instruments性能优化-Core Animation
- Android Animation开机动画的优化
- 使用Core Animation优化UIKit性能
- Mac 性能优化Instruments之Core Animation
- Instruments 中 Core Animation优化(二)
- animation
- animation
- Animation
- Animation
- Animation
- Animation
- Animation
- Animation
- Animation
- Android UML类图、流程图总结
- HTML5(五)html5<canvas路径和三角函数的故事>(下)
- C#图形验证码
- Selenium浏览器自动化测试使用(2)
- 53篇PHP开发技术干货,拿走,不谢~
- Animation 优化
- 03 WAMPServer多站点的配置
- 【慕课笔记】第四章 流程控制语句 第2节 JAVA条件语句之if...else...
- 解决.gitignore无法忽略部分文件
- lr_eval_string()函数以及LR中参数、变量的简单使用
- 良心推荐,76篇前端开发技术干货,拿走,不谢~
- 04 WAMPServer自拟定端口
- iOS使用Charles(青花瓷)抓包并篡改返回数据图文详解
- raspberry install python-mysqldb