当前位置: 首页>>代码示例>>C++>>正文


C++ AnchorPointFrame类代码示例

本文整理汇总了C++中AnchorPointFrame的典型用法代码示例。如果您正苦于以下问题:C++ AnchorPointFrame类的具体用法?C++ AnchorPointFrame怎么用?C++ AnchorPointFrame使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了AnchorPointFrame类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: clone

Frame* AnchorPointFrame::clone()
{
    AnchorPointFrame* frame = AnchorPointFrame::create();
    frame->setAnchorPoint(_anchorPoint);

    frame->cloneProperty(this);

    return frame;
}
开发者ID:stonejiang208,项目名称:cocos2d-x,代码行数:9,代码来源:CCFrame.cpp

示例2: new

// AnchorPointFrame
AnchorPointFrame* AnchorPointFrame::create()
{
    AnchorPointFrame* frame = new (std::nothrow) AnchorPointFrame();
    if (frame)
    {
        frame->autorelease();
        return frame;
    }
    CC_SAFE_DELETE(frame);
    return nullptr;
}
开发者ID:stonejiang208,项目名称:cocos2d-x,代码行数:12,代码来源:CCFrame.cpp

示例3: loadAnchorPointFrame

Frame* ActionTimelineCache::loadAnchorPointFrame (const rapidjson::Value& json)
{
    AnchorPointFrame* frame = AnchorPointFrame::create();

    float anchorx = DICTOOL->getFloatValue_json(json, X);
    float anchory = DICTOOL->getFloatValue_json(json, Y);

    frame->setAnchorPoint(Point(anchorx, anchory));

    return frame;
}
开发者ID:980538137,项目名称:MyGame-QuickCocos2dx,代码行数:11,代码来源:CCActionTimelineCache.cpp

示例4: loadAnchorPointFrameWithFlatBuffers

 Frame* ActionTimelineCache::loadAnchorPointFrameWithFlatBuffers(const flatbuffers::ScaleFrame *flatbuffers)
 {
     AnchorPointFrame* frame = AnchorPointFrame::create();
     
     auto f_scale = flatbuffers->scale();
     Vec2 scale(f_scale->scaleX(), f_scale->scaleY());
     frame->setAnchorPoint(scale);
     
     int frameIndex = flatbuffers->frameIndex();
     frame->setFrameIndex(frameIndex);
     
     bool tween = flatbuffers->tween() != 0;
     frame->setTween(tween);
     
     return frame;
 }
开发者ID:980538137,项目名称:MyGame-QuickCocos2dx,代码行数:16,代码来源:CCActionTimelineCache.cpp

示例5: loadAnchorPointFrameWithFlatBuffers

Frame* ActionTimelineCache::loadAnchorPointFrameWithFlatBuffers(const flatbuffers::TimeLinePointFrame *flatbuffers)
{
    AnchorPointFrame* frame = AnchorPointFrame::create();
    
    auto f_anchorPoint = flatbuffers->postion();
    Vec2 anchorPoint(f_anchorPoint->x(), f_anchorPoint->y());
    frame->setAnchorPoint(anchorPoint);
    
    int frameIndex = flatbuffers->frameIndex();
    frame->setFrameIndex(frameIndex);
    
    bool tween = flatbuffers->tween();
    frame->setTween(tween);
    
    return frame;
}
开发者ID:Ratel13,项目名称:cocos-reader,代码行数:16,代码来源:CCActionTimelineCache.cpp


注:本文中的AnchorPointFrame类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。