本文整理汇总了C++中CAnimation::Load方法的典型用法代码示例。如果您正苦于以下问题:C++ CAnimation::Load方法的具体用法?C++ CAnimation::Load怎么用?C++ CAnimation::Load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAnimation
的用法示例。
在下文中一共展示了CAnimation::Load方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateNinja
CNinja* Factory::CreateNinja(int level)
{
CNinja* ninja = new CNinja();
CAnimation anim;
anim.Load("Resources/AnimationInfo/VG_WhiteNinja1.dat", 1,0.75f);
ninja->AddAnim(anim);
anim.Load("Resources/AnimationInfo/VG_WhiteNinja1.dat", 2,0.15f);
ninja->AddAnim(anim);
anim.Load("Resources/AnimationInfo/VG_WhiteNinja1.dat", 3,0.15f);
ninja->AddAnim(anim);
anim.Load("Resources/AnimationInfo/VG_WhiteNinja1.dat", 4,0.15f);
ninja->AddAnim(anim);
anim.Load("Resources/AnimationInfo/VG_WhiteNinja1.dat", 5,0.15f, false);
ninja->AddAnim(anim);
anim.Load("Resources/AnimationInfo/VG_WhiteNinja1.dat", 6,0.15f);
ninja->AddAnim(anim);
anim.Load("Resources/AnimationInfo/VG_WhiteNinja1.dat", 7,0.15f);
ninja->AddAnim(anim);
anim.Load("Resources/AnimationInfo/VG_WhiteNinja1.dat", 8,0.15f);
ninja->AddAnim(anim);
ninja->SetStrength(16);
ninja->SetDefense(4);
ninja->SetAccuracy(10);
ninja->SetRange(1);
ninja->SetLevel(level);
ObjectManager::GetInstance()->Add(ninja);
return ninja;
}
示例2: CreateBoss
CBoss* Factory::CreateBoss()
{
CBoss* boss = new CBoss();
boss->SetAccuracy(10);
boss->SetBaseAP(16);
boss->SetCurrAP(16);
boss->SetDefense(10);
boss->SetHealthMax(250);
//boss->SetHealth(50);
boss->SetHealth(400);
boss->SetSpeed(10);
boss->SetStrength(20);
CAnimation anim;
anim.Load("Resources/AnimationInfo/VG_shredder.dat", 1,0.35f);//idle1,0
boss->AddAnim(anim);
anim.Load("Resources/AnimationInfo/VG_shredder.dat", 2,0.35f);//idle2,1
boss->AddAnim(anim);
anim.Load("Resources/AnimationInfo/VG_shredder.dat", 3,0.05f, false);//high,2
boss->AddAnim(anim);
anim.Load("Resources/AnimationInfo/VG_shredder.dat", 4,0.15f, false);//low,3
boss->AddAnim(anim);
anim.Load("Resources/AnimationInfo/VG_shredder.dat", 5,0.15f);//flip
boss->AddAnim(anim);
anim.Load("Resources/AnimationInfo/VG_shredder.dat", 6,0.15f);//ko
boss->AddAnim(anim);
anim.Load("Resources/AnimationInfo/VG_shredder.dat", 7,0.15f);//lose
boss->AddAnim(anim);
anim.Load("Resources/AnimationInfo/VG_shredder.dat", 8,0.15f, false);//ground special
boss->AddAnim(anim);
boss->SetVelX(100);
boss->SetVelY(50);
ObjectManager::GetInstance()->Add(boss);
return boss;
}