diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2017-02-13 20:20:38 -0500 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2017-02-13 20:20:38 -0500 |
commit | 29876964587eda6e4d4bfc6543ea31efe983cf0a (patch) | |
tree | 29e7e626bbfc7b6d1a26d788d710c7908048be92 /src/player.cpp | |
parent | 183331ccf1aa3f4142697e9e37528f084fae7466 (diff) |
base component class; skirl fight plus
Diffstat (limited to 'src/player.cpp')
-rw-r--r-- | src/player.cpp | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/src/player.cpp b/src/player.cpp index cd939bb..bcde388 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -88,48 +88,7 @@ void PlayerSystem::create(void) // handle player animation xmld.Parse(animationXML); - auto entan = player.assign<Animate>(); - auto animx = xmld.FirstChildElement()->FirstChildElement(); - - unsigned int limbid = 0; - float limbupdate = 0; - unsigned int limbupdatetype = 0; - - while (animx) { - std::string animType = animx->Name(); - std::cout << animx->Name() << std::endl; - if (animType == "movement") { - limbupdatetype = 1; - auto limbx = animx->FirstChildElement(); - while (limbx) { - std::string limbHopefully = limbx->Name(); - if (limbHopefully == "limb") { - auto frames = developFrame(limbx); - - entan->limb.push_back(Limb()); - entan->limb.back().updateType = limbupdatetype; - - if (limbx->QueryUnsignedAttribute("id", &limbid) == XML_NO_ERROR) { - entan->limb.back().limbID = limbid; - } - if (limbx->QueryFloatAttribute("update", &limbupdate) == XML_NO_ERROR) { - entan->limb.back().updateRate = limbupdate; - } - - // place our newly developed frames in the entities animation stack - for (auto &f : frames) { - entan->limb.back().addFrame(f); - for (auto &fr : entan->limb.back().frame) { - for (auto &sd : fr) - sd.first.limb = limbid; - } - } - } - limbx = limbx->NextSiblingElement(); - } - } - animx = animx->NextSiblingElement(); - } + player.assign<Animate>(nullptr, xmld.FirstChildElement()); } void PlayerSystem::configure(entityx::EventManager &ev) |