Ejemplo n.º 1
0
Skill* Skill::create(Hero* h){
	Skill* skill = new Skill();
	if(skill && skill->init(h)){
		skill->autorelease();
		return skill;
	}else{
		CC_SAFE_DELETE(skill);
		return nullptr;
	}
}
Ejemplo n.º 2
0
Skill* Skill::createSkill(SkillType skillType)
{
    Skill* skill = new Skill();
	if(skill && skill->init(skillType))
    {
        skill->autorelease();
        return skill;
    }
    CC_SAFE_DELETE(skill);
    return NULL;
}