Added attack animation for ghots
This commit is contained in:
parent
403b93e7f5
commit
90e2a369f4
430267
resources/w/default_float001.txt
Normal file
430267
resources/w/default_float001.txt
Normal file
File diff suppressed because it is too large
Load Diff
433186
resources/w/float_attack003.txt
Normal file
433186
resources/w/float_attack003.txt
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/w/ghost_skin001.png
(Stored with Git LFS)
Normal file
BIN
resources/w/ghost_skin001.png
(Stored with Git LFS)
Normal file
Binary file not shown.
15
src/Game.cpp
15
src/Game.cpp
@ -191,6 +191,21 @@ namespace ZL
|
|||||||
npc01->setTarget(npc01->position);
|
npc01->setTarget(npc01->position);
|
||||||
npcs.push_back(std::move(npc01));
|
npcs.push_back(std::move(npc01));
|
||||||
|
|
||||||
|
auto ghostTexture = std::make_shared<Texture>(CreateTextureDataFromPng("resources/w/ghost_skin001.png", CONST_ZIP_FILE));
|
||||||
|
|
||||||
|
auto npc02 = std::make_unique<Character>();
|
||||||
|
//npc02->loadAnimation(AnimationState::IDLE, "resources/w/default_float001.txt", CONST_ZIP_FILE);
|
||||||
|
npc02->loadAnimation(AnimationState::IDLE, "resources/w/float_attack003.txt", CONST_ZIP_FILE);
|
||||||
|
npc02->setTexture(ghostTexture);
|
||||||
|
npc02->walkSpeed = 1.5f;
|
||||||
|
npc02->rotationSpeed = 8.0f;
|
||||||
|
npc02->modelScale = 0.01f;
|
||||||
|
npc02->modelCorrectionRotation = Eigen::Quaternionf(Eigen::AngleAxisf(M_PI, Eigen::Vector3f::UnitY()));
|
||||||
|
|
||||||
|
npc02->position = Eigen::Vector3f(0.f, 0.f, -20.f);
|
||||||
|
npc02->setTarget(npc02->position);
|
||||||
|
npcs.push_back(std::move(npc02));
|
||||||
|
|
||||||
loadingCompleted = true;
|
loadingCompleted = true;
|
||||||
|
|
||||||
scriptEngine.init(this);
|
scriptEngine.init(this);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user