計時器追加功能

From http://wisdomskyduan.blogspot.tw/2012/05/510.html

 

內容程式出處:

Learning Cocos2D: A Hands-On Guide to Building iOS Games with Cocos2D, Box2D, and Chipmunk



zer931 發表在 痞客邦 留言(0) 人氣()

 ios-cocos2d游戏开发基础-预定信息-开发笔记(六)

节点可以预定信息,其实就是Objective-C里面的每隔一段时间调用一次方法。 在很多情况下,你需要节点调用指定的更新方法以处理某些情况,比如说碰撞 测试。以下是一个最简单的,可以在每一帧都被调用的更新方法:

-(void) scheduleUpdates {
[self scheduleUpdate];
} -(void) update:(ccTime)delta {
// 此方法每一帧都会被调用
}

zer931 發表在 痞客邦 留言(0) 人氣()

From http://www.ericd.net/2009/05/iphone-nstimer-and-that-thing-called.html

 

Tuesday, May 12, 2009

 iPhone: NSTimer and that thing called userInfo

Tuesday, May 12, 2009   

 
As I am implementing some stuff, I had reason to send along some information to a NSTimer's "onComplete" method. Every example online I've seen recently using NSTimer sets the userInfo property to nil. Not very useful for me to learn from. After a little banter on an email list, I understand how this thing works.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

zer931 發表在 痞客邦 留言(0) 人氣()

cocos2d-x 动画详解之一CCSprite

转自 http://www.cnblogs.com/afly/archive/2012/03/06/2382028.html

struct transformValues_ 拥有如下几个参数

CCPoint pos; // position x and y         位置
CCPoint scale; // scale x and y            放大缩小

zer931 發表在 痞客邦 留言(0) 人氣()

From http://wisdomskyduan.blogspot.tw/2012/05/ccspritebatchnode.html

MAY
13
 

zer931 發表在 痞客邦 留言(0) 人氣()

【Cocos2d遊戲開發之九】講解CCSpriteBatchNode與TP工具的".pvr.ccz",".plist"共用的終極精靈優化及注意事項!

時間:2011-09-09 19:59來源:Internet 作者:Internet 點擊: 222 次
             Himi 原創,轉載請注明!原文地址:http://blog.csdn.net/xiaominghimi
         Himi 原創,轉載請注明 

zer931 發表在 痞客邦 留言(0) 人氣()

  • Jul 07 Sat 2012 16:55
  • temp

【吼吼睡cocos2d学习笔记】第四章 - 第一个游戏

http://www.cnblogs.com/iosfans/archive/2011/12/12/2284854.html


zer931 發表在 痞客邦 留言(0) 人氣()

【iOS-cocos2d-X 游戏开发之十】自定义CCSprite/Layer/CCNode及静态类模版&自定义类细节说明&Cocos2dx触屏事件讲解

分类: 【 Cocos2dX 游戏开发】 1625人阅读 评论(1) 收藏 举报

本站文章均为 李华明Himi 原创,转载务必在明显处注明:
转载自【黑米GameDev街区】 原文链接: http://www.himigame.com/iphone-cocos2dx/699.html

zer931 發表在 痞客邦 留言(0) 人氣()

 

From http://blog.sina.com.cn/s/blog_4beb28f30100q8vv.html

 

一直以为都是在使用cocos2d开发游戏,当我添加一个结点时也比较喜欢使用[node addchild:child z:0 tag:ch]函数,当然在取得结点的也喜欢使用[node getchildbytag:ch];这样我个人认为比较简结,在程序中有些变量名也就避免了冲突,取而代之的是一个数字。这几个月以来一直都是这样取得 结点。但前几天才发现这做,算法上时间复杂度为O(n),跳进getchildbgytag函数的实现时,发现其结点是遍历其所有子结点,然后比较 tag,如果相等则返回该子结点的指针,如果不相等则返回空:

zer931 發表在 痞客邦 留言(0) 人氣()

from http://www.cnblogs.com/zilongshanren/archive/2011/05/10/2042514.html

免责申明(必读!):本博客提供的所有教程的翻译原稿均来自于互联网,仅供学习交流之用,切勿进行商业传播。同时,转载时不要移除本申明。如产生任何纠纷,均与本博客所有人、发表该翻译稿之人无任何关系。谢谢合作!

原文出处:http://www.raywenderlich.com/2343/how-to-drag-and-drop-sprites-with-cocos2d

zer931 發表在 痞客邦 留言(0) 人氣()