Armature *Armature::create(const std::string& name) { Armature *armature = new (std::nothrow) Armature(); if (armature && armature->init(name)) { armature->autorelease(); return armature; } CC_SAFE_DELETE(armature); return nullptr; }
Armature *Armature::create() { Armature *armature = new Armature(); if (armature && armature->init()) { armature->autorelease(); return armature; } CC_SAFE_DELETE(armature); return nullptr; }
Armature *Armature::create(const std::string& name, Bone *parentBone) { Armature *armature = new Armature(); if (armature && armature->init(name, parentBone)) { armature->autorelease(); return armature; } CC_SAFE_DELETE(armature); return nullptr; }
Armature *Armature::create(const char* name, Bone *parentBone) { Armature *armature = new Armature(); if (armature && armature->init(name, parentBone)) { armature->autorelease(); return armature; } CC_SAFE_DELETE(armature); return NULL; }
Armature *Armature::createWithComArmature(const char* _name, ComArmature *_comArmature) { #if CS_DEBUG_FOR_EDIT Armature *armature = new EditorArmature(); #else Armature *armature = new Armature(); #endif if (armature && armature->initWithComArmature(_name, _comArmature)) { armature->autorelease(); return armature; } CC_SAFE_DELETE(armature); return NULL; }