Example #1
0
EnemyPlane* EnemyPlane::createWithSpriteFrameName(const char* spriteFrameName){
	EnemyPlane* pPlane = new EnemyPlane;
	if (pPlane&&pPlane->initWithSpriteFrameName(spriteFrameName)){
		pPlane->autorelease();
		return pPlane;
	}
	CC_SAFE_RELEASE(pPlane);
	return NULL;
}
Example #2
0
EnemyPlane*  EnemyPlane::create(DefaultPlane* const player_plane)
{
    EnemyPlane* pSprite = new EnemyPlane(player_plane);
    
    if (pSprite->initWithFile("enemyplane.png"))
    {
        pSprite->autorelease();
        
        pSprite->initOptions();
        
        pSprite->addEvents();
        
        pSprite->ChangeBehavoiur(player_plane);
        
        return pSprite;
    }
    CC_SAFE_DELETE(pSprite);
    return NULL;

}