本文整理汇总了C++中Animation::SetAnimIntervals方法的典型用法代码示例。如果您正苦于以下问题:C++ Animation::SetAnimIntervals方法的具体用法?C++ Animation::SetAnimIntervals怎么用?C++ Animation::SetAnimIntervals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Animation
的用法示例。
在下文中一共展示了Animation::SetAnimIntervals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DisposeMovieActors
/* 役者の配置 */
void CurtainRollScr::DisposeMovieActors()
{
// ヒロイン
heroine = new MovieActor(GI("HERSIZE"), GI("HERSIZE"));
Animation* walk = new Animation();
walk->SetGraphicSource("graphics\\heroine\\heroine_work.png");
walk->SetAnimData(0, 1, 2, 3, 4, 5, 6, 7, -1);
walk->SetAnimIntervals(0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, -1.0f);
walk->SetAnimMode(Animation::ANMD_LOOP);
Animation* stop = new Animation();
stop->SetGraphicSource("graphics\\heroine\\heroine_stend.png");
stop->SetAnimData(0, 1, 2, 1, 3, 4, 5, 4, -1);
stop->SetAnimIntervals(0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, -1.0f);
stop->SetAnimMode(Animation::ANMD_LOOP);
Animation* attack = new Animation();
attack->SetGraphicSource("graphics\\heroine\\heroine_attack.png");
attack->SetAnimData(0, 1, 2, 3, 4, 5, 6, -1);
attack->SetAnimIntervals(0.06, 0.12, 0.20, 0.28, 0.36, 0.44, 0.52, -1.0f);
attack->SetLoopStartIdx(3);
attack->SetAnimMode(Animation::ANMD_LOOP);
Animation* attackEnd = new Animation();
attackEnd->SetGraphicSource("graphics\\heroine\\heroine_attack.png");
attackEnd->SetAnimData(3, 4, 5, 6, 7, 8, 9, -1);
attackEnd->SetAnimIntervals(0.07, 0.15, 0.24, 0.34, 0.45, 0.57, 0.70, -1.0f);
attackEnd->SetAnimMode(Animation::ANMD_STOPATEND);
heroine->GetAnimationSet()->AddAnimation(HERAN_WALK, walk);
heroine->GetAnimationSet()->AddAnimation(HERAN_STOP, stop);
heroine->GetAnimationSet()->AddAnimation(HERAN_ATT, attack);
heroine->GetAnimationSet()->AddAnimation(HERAN_ATTEND, attackEnd);
heroine->GetAnimationSet()->SetCurAnimation(HERAN_WALK);
heroine->SetPos( -120, -120 );
heroine->SetMuki(1);
heroine->SetZ(100.0f);
heroine->AddFrame(0);
heroine->AddCircle(0, SP->GRID_KOUGEKI, 24, 92, 24);
// カエルキング
Animation* frogStand = new Animation();
frogStand->SetGraphicSource("graphics\\teki\\ene_frogking.png");
frogStand->SetAnimData(0, -1);
frogStand->SetAnimIntervals(0.2f, -1.0f);
Animation* frogDie = frogStand->Clone();
frogDie->SetRotAngle( D3DX_PI );
actors[0] = new MovieActor(GI("KAERUKSX"), GI("KAERUKSY"));
actors[0]->GetAnimationSet()->AddAnimation( TEKI_STAND, frogStand );
actors[0]->GetAnimationSet()->AddAnimation( TEKI_DIE, frogDie );
actors[0]->SetPos( 216+500, 464-16 );
actors[0]->SetMuki(0);
actors[0]->SetZ(0);
actors[0]->AddFrame(0);
actors[0]->AddCircle(0, SP->GRID_BOGYO, 44, 44, 44);
actors[0]->AddTarget(heroine);
// トランプ兵
Animation* trumpStand = new Animation();
trumpStand->SetGraphicSource("graphics\\teki\\queen\\ene_tranpma1_walk.png");
trumpStand->SetAnimData(0, -1);
trumpStand->SetAnimIntervals(0.2f, -1.0f);
Animation* trumpDie = new Animation();
trumpDie->SetGraphicSource( "graphics\\teki\\queen\\ene_tranpman1_down.png" );
trumpDie->SetAnimData( 0, 1, -1 );
trumpDie->SetAnimIntervals( 0.2f, 0.4f, -1.0f );
trumpDie->SetAnimMode(Animation::ANMD_STOPATEND);
actors[1] = new MovieActor(GI("TRUMPHEISX"), GI("TRUMPHEISY"));
actors[1]->GetAnimationSet()->AddAnimation( TEKI_STAND, trumpStand );
actors[1]->GetAnimationSet()->AddAnimation( TEKI_DIE, trumpDie );
actors[1]->SetPos( 204+500, 344-16 );
actors[1]->SetMuki(0);
actors[1]->SetZ(1);
actors[1]->AddFrame(0);
actors[1]->AddRect(0, SP->GRID_BOGYO, 77, 98, 109, 207);
actors[1]->AddTarget(heroine);
// 魔女
Animation* majoStand = new Animation();
majoStand->SetGraphicSource("graphics\\teki\\boss_witch_side.png");
majoStand->SetAnimData(0, 1, 2, 1, -1);
majoStand->SetAnimIntervals(0.2f, 0.4f, 0.6f, 0.8f, -1.0f);
majoStand->SetAnimMode( Animation::ANMD_LOOP );
Animation* majoDie = new Animation();
majoDie->SetGraphicSource("graphics\\teki\\boss_witch_side.png");
majoDie->SetAnimData(11, 12, 13, 14, -1);
majoDie->SetAnimIntervals(0.2f, 0.4f, 0.6f, 0.8f, -1.0f);
majoDie->SetAnimMode( Animation::ANMD_STOPATEND );
actors[2] = new MovieActor(GI("MAJO_DOORSX"), GI("MAJO_DOORSY"));
actors[2]->GetAnimationSet()->AddAnimation( TEKI_STAND, majoStand );
actors[2]->GetAnimationSet()->AddAnimation( TEKI_DIE, majoDie );
actors[2]->SetPos( 280+500, 436-16 );
//.........这里部分代码省略.........