增加道具店,旅馆

This commit is contained in:
ozg
2014-06-10 00:04:02 +08:00
parent be6e11ebb1
commit 4814dff441
59 changed files with 984 additions and 77 deletions
+5 -3
View File
@@ -17,12 +17,14 @@ RPGMapNPCRoleSprite::~RPGMapNPCRoleSprite()
// CCLog("RPGMapNPCRoleSprite 释放");
}
bool RPGMapNPCRoleSprite::init(CCString *roleTexture, CCString* headTexture, CCString* name, CCString* content, int defaultSpriteFrameIndex, bool autoMove)
bool RPGMapNPCRoleSprite::init(int dataId, CCString *roleTexture, CCString* headTexture, CCString* name, CCString* content, int defaultSpriteFrameIndex, bool autoMove)
{
if(RPGMapRoleSprite::init(roleTexture, name, false, defaultSpriteFrameIndex))
{
this->m_autoMove = autoMove;
this->m_dataId = dataId;
this->m_content = content;
this->m_content->retain();
@@ -36,10 +38,10 @@ bool RPGMapNPCRoleSprite::init(CCString *roleTexture, CCString* headTexture, CCS
}
//static
RPGMapNPCRoleSprite* RPGMapNPCRoleSprite::create(CCString *roleTexture, CCString* headTexture, CCString* name, CCString* content, int defaultSpriteFrameIndex, bool autoMove)
RPGMapNPCRoleSprite* RPGMapNPCRoleSprite::create(int dataId, CCString *roleTexture, CCString* headTexture, CCString* name, CCString* content, int defaultSpriteFrameIndex, bool autoMove)
{
RPGMapNPCRoleSprite *obj = new RPGMapNPCRoleSprite();
if(obj && obj->init(roleTexture, headTexture, name, content, defaultSpriteFrameIndex, autoMove))
if(obj && obj->init(dataId, roleTexture, headTexture, name, content, defaultSpriteFrameIndex, autoMove))
{
obj->autorelease();
return obj;