1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-15 14:09:06 +00:00

minor fixups (Entity::revive() and some skeletal stuff)

This commit is contained in:
fgenesis 2013-02-03 16:13:07 +01:00
parent 3dbc92b16e
commit 76c31f8147
4 changed files with 9 additions and 8 deletions

View file

@ -812,7 +812,7 @@ void Entity::heal(float a, int type)
}
}
void Entity::revive(int a)
void Entity::revive(float a)
{
entityDead = false;
health = 0;

View file

@ -351,7 +351,7 @@ public:
bool isHit();
bool pathBurst(bool wallJump = false);
Timer burstTimer;
void revive(int a);
void revive(float a);
void setName(const std::string &name);
void doFriction(float dt);
void doFriction(float dt, int len);

View file

@ -461,7 +461,7 @@ void AnimationLayer::playAnimation(int idx, int loop)
//doNextKeyframe();
}
void AnimationLayer::enqueueAnimation(std::string anim, int loop)
void AnimationLayer::enqueueAnimation(const std::string& anim, int loop)
{
enqueuedAnimation = anim;
enqueuedAnimationLoop = loop;
@ -514,7 +514,7 @@ Animation* AnimationLayer::getCurrentAnimation()
return &s->animations[currentAnimation];
}
bool AnimationLayer::createTransitionAnimation(std::string anim, float time)
bool AnimationLayer::createTransitionAnimation(const std::string& anim, float time)
{
//Animation *a = getCurrentAnimation();
Animation *to = s->getAnimation(anim);
@ -555,6 +555,7 @@ void AnimationLayer::stopAnimation()
{
animate(enqueuedAnimation, enqueuedAnimationLoop);
enqueuedAnimation = "";
enqueuedAnimationLoop = 0;
}
}
@ -1145,7 +1146,7 @@ void SkeletalSprite::deleteBones()
bones.clear();
}
Animation *SkeletalSprite::getAnimation(std::string anim)
Animation *SkeletalSprite::getAnimation(const std::string& anim)
{
for (int i = 0; i < animations.size(); i++)
{

View file

@ -163,10 +163,10 @@ public:
void updateBones();
void stopAnimation();
float getAnimationLength();
bool createTransitionAnimation(std::string anim, float time);
bool createTransitionAnimation(const std::string& anim, float time);
void playAnimation(int idx, int loop);
void playCurrentAnimation(int loop);
void enqueueAnimation(std::string anim, int loop);
void enqueueAnimation(const std::string& anim, int loop);
float transitionAnimate(std::string anim, float time, int loop);
void setTimeMultiplier(float t);
bool isAnimating();
@ -240,7 +240,7 @@ public:
Animation *getAnimation(std::string anim);
Animation *getAnimation(const std::string& anim);
std::vector<Animation> animations;
std::vector<Bone*> bones;