Ejemplo n.º 1
0
ColliderDetector *ColliderDetector::create()
{
    ColliderDetector *pColliderDetector = new (std::nothrow) ColliderDetector();
    if (pColliderDetector && pColliderDetector->init())
    {
        pColliderDetector->autorelease();
        return pColliderDetector;
    }
    CC_SAFE_DELETE(pColliderDetector);
    return nullptr;
}
ColliderDetector *ColliderDetector::create(Bone *bone)
{
    ColliderDetector *pColliderDetector = new ColliderDetector();
    if (pColliderDetector && pColliderDetector->init(bone))
    {
        pColliderDetector->autorelease();
        return pColliderDetector;
    }
    CC_SAFE_DELETE(pColliderDetector);
    return nullptr;
}
Ejemplo n.º 3
0
ColliderDetector *ColliderDetector::create()
{
	ColliderDetector *pColliderDetector = new ColliderDetector();
	if (pColliderDetector && pColliderDetector->init())
	{
		pColliderDetector->autorelease();
		return pColliderDetector;
	}
	CC_SAFE_DELETE(pColliderDetector);
	return NULL;
}