zoukankan      html  css  js  c++  java
  • CCToggleVisibility和CCPlace

        CCActionInterval*  move1 = CCMoveBy::create(1, ccp(250,0));
        CCActionInterval*  move2 = CCMoveBy::create(1, ccp(0,50));
        CCToggleVisibility*  tog1 = new CCToggleVisibility();
        CCToggleVisibility*  tog2 = new CCToggleVisibility();
        tog1->autorelease();
        tog2->autorelease();
        //目前的理解是夹在tog1和tog2间的move2将不显示中间的过渡动作,
       //动作的时间到了之后精灵就直接显示在动作的结果位置
        CCFiniteTimeAction*  seq = CCSequence::create( move1, tog1, move2, tog2, move1->reverse(), NULL);
        CCActionInterval*  action = CCRepeat::create((CCActionInterval*)(CCSequence::create( seq, seq->reverse(), NULL)), 3);
    void ActionRepeat::onEnter()
    {
        ActionsDemo::onEnter();
    
        alignSpritesLeft(2);
    
    
        CCActionInterval*  a1 = CCMoveBy::create(1, ccp(150,0));
        CCActionInterval*  action1 = CCRepeat::create(
            //动作组:先在(60,60)位置显示,然后执行动作a1
            //对该动作组重复执行3次
            CCSequence::create( CCPlace::create(ccp(60,60)), a1, NULL) , 
            3); 
        CCAction*  action2 = CCRepeatForever::create(
            (CCActionInterval*)(CCSequence::create((CCActionInterval*)(a1->copy()->autorelease()), a1->reverse(), NULL))
            );
    
        m_kathia->runAction(action1);
        m_tamara->runAction(action2);
    }
  • 相关阅读:
    安卓系统
    移动互联网产品设计的原则
    Java 笔记10
    Get Android Source Code
    Spinner Animation
    Java 笔记09
    Java 笔记07
    Java 笔记08
    例题
    例题
  • 原文地址:https://www.cnblogs.com/newlist/p/3204063.html
Copyright © 2011-2022 走看看