摘要: Tiled Map EditorFile->NewOrientation(Orthogonal)->Map size(50*50)->Tile size(32*32)Map->New Tileset...Tileset->Image(.png)->Tiles->32*32->Margin(1)->Spacing(1)CCTMXTiledMap *tileMap;CCTMXLayer *background;tileMap = [CCTMXTiledMap tiledMapWithTMXFile:@"TileMap.tmx" 阅读全文
posted @ 2013-02-14 14:20 joojoosue 阅读(282) 评论(1) 推荐(0) 编辑
摘要: 在Cocos2D里,屏幕的左下角是(0,0)点,随着你往右上方向移动,x和y值会随之增加。每当设置一个对象的坐标,默认情况下设置的是该对象自身中心的位置。-(id) init{ if( (self=[super init] )) { CGSize winSize = [[CCDirector sharedDirector] winSize]; CCSprite *player = [CCSprite spriteWithFile:@"Player.png" rect:CGRectMake(0, 0, 27, 40)]; //加载精灵,可省略rect:,让Cocos2d自己处 阅读全文
posted @ 2013-02-14 11:48 joojoosue 阅读(160) 评论(1) 推荐(0) 编辑
摘要: FlashDevelop项目右键->Properties->Compiler Options->SWC Include Libraries(lib/CEV3-1-3-ALL.swc)Flash Player 11public class Main extends StarlingCitrusEngine //使用Starling{ public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } ... 阅读全文
posted @ 2013-02-13 12:10 joojoosue 阅读(328) 评论(1) 推荐(0) 编辑
摘要: starling 1.3,Hi-ReS-StatsFlashDevelop设置Project->Properties->Output->Platform->Flash Player->11.5->Classpaths->Add Classpath->(starling和Stats的src文件夹)程序入口[SWF(frameRate="60", width="800", height="600", backgroundColor="0x333333")]public c 阅读全文
posted @ 2013-02-10 15:57 joojoosue 阅读(279) 评论(1) 推荐(0) 编辑
摘要: 第1章 类型、变量与标准I/O控制台窗口停留,批处理文件(.bat):xxx.exepause命名空间:using namespace std;或using std::cout;short int可以缩写成short,long int可以缩写成long。第2章 真值、分支与游戏循环任何非零值都解释成true,而0则解释成false。switch语句只能用来比较int型(或其他可以当做int型处理的值,如char型或枚举数)。随机数的生成:#include <cstdlib>#include <ctime>srand(static_cast<unsigned int 阅读全文
posted @ 2013-01-18 21:18 joojoosue 阅读(479) 评论(1) 推荐(0) 编辑