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; }
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; }