newlist

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

随笔分类 -  cocos2d-x引擎

解析引擎代码
摘要:#ifndef __CC_IMAGE_H__#define __CC_IMAGE_H__//派生于CCObject#include "cocoa/CCObject.h"//Cocos2d命名空间NS_CC_BEGINclass CC_DLL CCImage : public CCObject{public: //构造函数 CCImage(); //析构函数 ~CCImage(); //支持的图片类型 typedef enum { kFmtJpg = 0, //JPG kFmtPng, //PNG ... 阅读全文
posted @ 2013-11-11 20:51 一枚程序 阅读(1005) 评论(0) 推荐(0)

摘要:/****************************************************************************Copyright (c) 2010-2012 cocos2d-x.orgCopyright (c) 2008-2010 Ricardo QuesadaCopyright (c) 2011 Zynga Inc.http://www.cocos2d-x.orgPermission is hereby granted, free of charge, to any person obtaining a copyof this softw... 阅读全文
posted @ 2013-11-10 22:08 一枚程序 阅读(1729) 评论(0) 推荐(0)

摘要:/****************************************************************************Copyright (c) 2010 cocos2d-x.orghttp://www.cocos2d-x.orgPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin t 阅读全文
posted @ 2013-11-10 22:06 一枚程序 阅读(1336) 评论(0) 推荐(0)

摘要:/****************************************************************************Copyright (c) 2010 cocos2d-x.orghttp://www.cocos2d-x.orgPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin t 阅读全文
posted @ 2013-11-10 22:04 一枚程序 阅读(587) 评论(0) 推荐(0)

摘要:// CCFollow// 作用:创建一个跟随动作// 参数1:跟随的目标对象// 跟随范围,离开范围就不再跟随 //创建一个参照物spT// CCSprite * spt = CCSprite::create("Icon.png");// spt->setPosition(ccp(420,40));// addChild(spt);// sp->runAction(CCMoveTo::create(3, ccp(940,sp->getPositionY())));// // CCFollow * follow = CCFollow::create(sp, 阅读全文
posted @ 2013-11-10 21:37 一枚程序 阅读(531) 评论(0) 推荐(0)