Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 447 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
447
Dung lượng
4,21 MB
Nội dung
[...]... Using Cocos2d- X Using Cocos3d Releasing your app 410 413 416 420 Index 423 iv Preface Cocos2d foriPhone is a robust but simple to use 2D game framework for iPhone It is fast, flexible, free, and App Store approved More than 2500 App Store games already use it, including many best-selling games Do you want to take your Cocos2d gamedevelopment skills to the next level and become more professional in Cocos2d. .. ccDrawSolidCircle(ccp(280 ,18 0), 25.0f, 0.0f, 20, NO); //Draw a brown hollow circle glColor4ub(64,32, 0, 255); ccDrawCircle(ccp(200 ,18 0), 25.0f, 0.0f, 10 0, NO); ccDrawCircle(ccp(280 ,18 0), 25.0f, 0.0f, 10 0, NO); 23 Graphics //Draw brown lines glColor4ub(64,32, 0, 255); ccDrawLine(ccp(225 ,18 0), ccp(255 ,18 0)); ccDrawLine(ccp(305 ,18 0), ccp(370 ,16 0)); ccDrawLine(ccp (17 5 ,18 0), ccp (11 0 ,16 0)); //Draw an orange... glColor4ub(255, 12 8, 0, 255); CGPoint vertices[5]={ ccp(230 ,15 0),ccp(240 ,16 0),ccp(250 ,15 0),ccp(245 ,14 0),ccp(235 ,14 0) }; ccDrawPoly(vertices, 5, YES); //Draw a yellow cubic bezier curve glColor4ub(255, 255, 0, 255); ccDrawCubicBezier(ccp (17 0,90), ccp(220 ,15 0), ccp(260,50), ccp(320 ,10 0), 10 ); //Restore original values glLineWidth (1) ; glDisable(GL_LINE_SMOOTH); glColor4ub(255,255,255,255); glPointSize (1) ; } @end... setPosition:ccp(arc4random()%500-50, arc4random() %15 0+200)]; } //Middleground Grass int capacity = 10 ; CCSpriteBatchNode *grassBatch1 = [CCSpriteBatchNode batchNodeWithFile:@"grass_ 01. png" capacity:capacity]; [self addChild:grassBatch1 z :1 tag:TAG_GRASS_BATCH _1] ; for( int x=0; x . rotation 10 1
Pinch zooming 10 3
Performing gestures 10 6
Chapter 3: Files and Data 11 1
Introduction 11 1
Reading PLIST data les 11 2
Reading JSON data les 11 6
Reading. your Cocos2d game development
skills to the next level and become more professional in Cocos2d game design?
Cocos2d for iPhone 1 Game Development Cookbook