コード例 #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;
}
コード例 #2
0
ColliderDetector *ColliderDetector::create(Bone *bone)
{
    ColliderDetector *pColliderDetector = new ColliderDetector();
    if (pColliderDetector && pColliderDetector->init(bone))
    {
        pColliderDetector->autorelease();
        return pColliderDetector;
    }
    CC_SAFE_DELETE(pColliderDetector);
    return nullptr;
}
コード例 #3
0
ColliderDetector *ColliderDetector::create()
{
	ColliderDetector *pColliderDetector = new ColliderDetector();
	if (pColliderDetector && pColliderDetector->init())
	{
		pColliderDetector->autorelease();
		return pColliderDetector;
	}
	CC_SAFE_DELETE(pColliderDetector);
	return NULL;
}