コード例 #1
0
CCCircleShape* CCCircleShape::create(float radius,
                                     float angle,
                                     unsigned int segments,
                                     bool drawLineToCenter)
{
    CCCircleShape* circle = new CCCircleShape();
    circle->m_radius = radius;
    circle->m_angle = angle;
    circle->m_segments = segments;
    circle->m_drawLineToCenter = drawLineToCenter;
    circle->m_scaleX = 1.0f;
    circle->m_scaleY = 1.0f;
    circle->autorelease();
    return circle;
}
コード例 #2
0
ファイル: CCShapeNode.cpp プロジェクト: alantrue/cocos2d-x
CCCircleShape* CCCircleShape::create(float radius)
{
    CCCircleShape* circle = new CCCircleShape(radius);
    circle->autorelease();
    return circle;
}