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


C++ Director::getActionManager方法代码示例

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


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

示例1: unpause

void PauseTest::unpause(float dt)
{
    unschedule( schedule_selector(PauseTest::unpause) );
    Node* node = getChildByTag( kTagGrossini );
    Director* pDirector = Director::sharedDirector();
    pDirector->getActionManager()->resumeTarget(node);
}
开发者ID:bassarisse,项目名称:LostInCaves,代码行数:7,代码来源:ActionManagerTest.cpp

示例2: onEnter

void PauseTest::onEnter()
{
    //
    // This test MUST be done in 'onEnter' and not on 'init'
    // otherwise the paused action will be resumed at 'onEnter' time
    //
    ActionManagerTest::onEnter();
    

    LabelTTF* l = LabelTTF::create("After 5 seconds grossini should move", "Thonburi", 16);
    addChild(l);
    l->setPosition( ccp(VisibleRect::center().x, VisibleRect::top().y-75) );
    
    
    //
    // Also, this test MUST be done, after [super onEnter]
    //
    Sprite* grossini = Sprite::create(s_pPathGrossini);
    addChild(grossini, 0, kTagGrossini);
    grossini->setPosition(VisibleRect::center() );
    
    Action* action = MoveBy::create(1, ccp(150,0));

    Director* pDirector = Director::sharedDirector();
    pDirector->getActionManager()->addAction(action, grossini, true);

    schedule( schedule_selector(PauseTest::unpause), 3); 
}
开发者ID:bassarisse,项目名称:LostInCaves,代码行数:28,代码来源:ActionManagerTest.cpp

示例3:

Node::Node(void)
: _rotationX(0.0f)
, _rotationY(0.0f)
, _scaleX(1.0f)
, _scaleY(1.0f)
, _vertexZ(0.0f)
, _position(Point::ZERO)
, _skewX(0.0f)
, _skewY(0.0f)
, _anchorPointInPoints(Point::ZERO)
, _anchorPoint(Point::ZERO)
, _contentSize(Size::ZERO)
, _additionalTransformDirty(false)
, _transformDirty(true)
, _inverseDirty(true)
// children (lazy allocs)
// lazy alloc
, _ZOrder(0)
, _parent(nullptr)
// "whole screen" objects. like Scenes and Layers, should set _ignoreAnchorPointForPosition to true
, _tag(Node::INVALID_TAG)
// userData is always inited as nil
, _userData(nullptr)
, _userObject(nullptr)
, _shaderProgram(nullptr)
, _orderOfArrival(0)
, _running(false)
, _visible(true)
, _ignoreAnchorPointForPosition(false)
, _reorderChildDirty(false)
, _isTransitionFinished(false)
, _updateScriptHandler(0)
, _componentContainer(nullptr)
#if CC_USE_PHYSICS
, _physicsBody(nullptr)
#endif
, _displayedOpacity(255)
, _realOpacity(255)
, _displayedColor(Color3B::WHITE)
, _realColor(Color3B::WHITE)
, _cascadeColorEnabled(false)
, _cascadeOpacityEnabled(false)
{
    // set default scheduler and actionManager
    Director *director = Director::getInstance();
    _actionManager = director->getActionManager();
    _actionManager->retain();
    _scheduler = director->getScheduler();
    _scheduler->retain();
    _eventDispatcher = director->getEventDispatcher();
    _eventDispatcher->retain();
    
    ScriptEngineProtocol* engine = ScriptEngineManager::getInstance()->getScriptEngine();
    _scriptType = engine != nullptr ? engine->getScriptType() : kScriptTypeNone;

    kmMat4Identity(&_transform);
    kmMat4Identity(&_inverse);
    kmMat4Identity(&_additionalTransform);
}
开发者ID:ccppluagopy,项目名称:cocos3.0_extention,代码行数:59,代码来源:CCNode.cpp

示例4: resumeGrossini

void ResumeTest::resumeGrossini(float time)
{
    this->unschedule(schedule_selector(ResumeTest::resumeGrossini));

    Node* pGrossini = getChildByTag(kTagGrossini);
    Director* pDirector = Director::sharedDirector();
    pDirector->getActionManager()->resumeTarget(pGrossini);
}
开发者ID:bassarisse,项目名称:LostInCaves,代码行数:8,代码来源:ActionManagerTest.cpp

示例5: ComponentContainer

Node::Node(void)
: _rotationX(0.0f)
, _rotationY(0.0f)
, _scaleX(1.0f)
, _scaleY(1.0f)
, _vertexZ(0.0f)
, _position(Point::ZERO)
, _skewX(0.0f)
, _skewY(0.0f)
, _anchorPointInPoints(Point::ZERO)
, _anchorPoint(Point::ZERO)
, _contentSize(Size::ZERO)
, _additionalTransform(AffineTransformMakeIdentity())
, _camera(NULL)
// children (lazy allocs)
// lazy alloc
, _grid(NULL)
, _ZOrder(0)
, _children(NULL)
, _parent(NULL)
// "whole screen" objects. like Scenes and Layers, should set _ignoreAnchorPointForPosition to true
, _tag(kNodeTagInvalid)
// userData is always inited as nil
, _userData(NULL)
, _userObject(NULL)
, _shaderProgram(NULL)
, _GLServerState(ccGLServerState(0))
, _orderOfArrival(0)
, _running(false)
, _transformDirty(true)
, _inverseDirty(true)
, _additionalTransformDirty(false)
, _visible(true)
, _ignoreAnchorPointForPosition(false)
, _reorderChildDirty(false)
, _isTransitionFinished(false)
, _updateScriptHandler(0)
, _componentContainer(NULL)
{
    // set default scheduler and actionManager
    Director *director = Director::getInstance();
    _actionManager = director->getActionManager();
    _actionManager->retain();
    _scheduler = director->getScheduler();
    _scheduler->retain();

    ScriptEngineProtocol* pEngine = ScriptEngineManager::getInstance()->getScriptEngine();
    _scriptType = pEngine != NULL ? pEngine->getScriptType() : kScriptTypeNone;
    _componentContainer = new ComponentContainer(this);
}
开发者ID:Ben-Cortina,项目名称:GameBox,代码行数:50,代码来源:CCNode.cpp


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