コード例 #1
0
ファイル: ActionTest.cpp プロジェクト: manucorporat/FORZE2D
ActionRotateJerk::ActionRotateJerk()
: ActionBase("RotateJerk", NULL)
{
    ActionInterval *seq = new Sequence(new RotateTo(0.5f, -20),
                                       new RotateTo(0.5f, 20), NULL);
    
    ActionInterval *rep1 = new Repeat(seq, 10);
    Action *rep2 = new RepeatForever(seq->copy());

    tamara->runAction(rep1);
    kathia->runAction(rep2);
}
コード例 #2
0
ファイル: ActionTest.cpp プロジェクト: manucorporat/FORZE2D
ActionRotateToRepeat::ActionRotateToRepeat()
: ActionBase("RotateToRepeat", NULL)
{
    ActionInterval *action1 = new RotateTo(1, 90);
    ActionInterval *action2 = new RotateTo(1, 0);
    ActionInterval *seq = new Sequence(action1, action2, NULL);
    
    
    Action *rep1 = new RepeatForever(seq->copy());   
    Action *rep2 = new Repeat(seq, 5);

    tamara->runAction(rep1);
    kathia->runAction(rep2);
}