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:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user