1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

First draft of spell animation configuration

This commit is contained in:
AlexVinS
2014-11-26 22:25:13 +03:00
parent b31ed0e4ea
commit 16d08b062a
7 changed files with 328 additions and 64 deletions

View File

@ -549,6 +549,35 @@ void CSpell::setupMechanics()
mechanics = ISpellMechanics::createMechanics(this);
}
///CSpell::AnimationInfo
CSpell::AnimationInfo::AnimationInfo()
{
}
CSpell::AnimationInfo::~AnimationInfo()
{
}
std::string CSpell::AnimationInfo::selectProjectile(const double angle) const
{
std::string res;
double maximum = 0.0;
for(const auto & info : projectile)
{
if(info.minimumAngle < angle && info.minimumAngle > maximum)
{
maximum = info.minimumAngle;
res = info.defName;
}
}
return std::move(res);
}
///CSpell::TargetInfo
CSpell::TargetInfo::TargetInfo(const CSpell * spell, const int level)
{