gamelogic scheduleUpdate
来源:互联网 发布:几经褪色的记录 知乎 编辑:程序博客网 时间:2024/06/15 00:19
@interface GameplayLayer : CCLayer <GameplayLayerDelegate> { CCSprite *vikingSprite;SneakyJoystick *leftJoystick;SneakyButton *jumpButton;SneakyButton *attackButton; CCSpriteBatchNode *sceneSpriteBatchNode;}@end
#pragma mark –#pragma mark Update Method-(void) update:(ccTime)deltaTime {CCArray *listOfGameObjects = [sceneSpriteBatchNode children]; // 1for (GameCharacter *tempChar in listOfGameObjects) { // 2 [tempChar updateStateWithDeltaTime:deltaTime andListOfGameObjects: listOfGameObjects]; // 3 }}
需要更新的game object放到一个batchNode中,每帧通过children取出。而不需要持有每个对象。
[self scheduleUpdate];
Sets up a scheduler call that will f ire the update method in GameplayLayer.m on every frame.
- gamelogic scheduleUpdate
- GameLogic.cpp
- GameLogic.h
- 热血军团-GameLogic
- schedule和scheduleupdate
- scheduleUpdate 定时更新
- cocos2dx之scheduleUpdate
- scheduleUpdate和unscheduleUpdate
- scheduleUpdate not work
- [cocos2d-x]定时器函数scheduleUpdate
- cocos2dx 定时器 schedule scheduleUpdate scheduleOnce
- cocos2d开发之定时消息(scheduleUpdate)
- cocos2d 中scheduleUpdate和scheduleUpdateWithPriority对比
- Cocos2D-x schedule & scheduleUpdate 的使用
- Cocos2D-x schedule & scheduleUpdate 的使用
- cocos2dx 定时器使用 schedule,scheduleUpdate,scheduleOnce
- cocos2d-x调用scheduleUpdate()不执行update()方法的解决办法
- cocos2d-x调用scheduleUpdate()不执行update()方法的解决办法
- S3C2416 Linux2.6.21 驱动移植--添加UART3 及波特率设置bug消除
- 显存相关概念
- ubuntu 编译安装Erlang R15B 及R15B observer工具
- 图和网络分析重要库简介
- Intent传递方式
- gamelogic scheduleUpdate
- C++运算符优先级
- 代码段
- 读jQuery之七(判断点击了鼠标哪个键)
- JavaScript实现图片预加载
- MySQL 数据库性能优化之索引优化(这是 MySQL数据库性能优化专题 系列的第三篇文章)
- 随机数
- 按照日期查询一天、一周、一月的sql
- Oracle XDK 组件 说明