forked from jaildesigner-jailgames/jaildoctors_dilemma
canvi de pc
This commit is contained in:
@@ -226,7 +226,7 @@ int AnimatedSprite::getIndex(std::string name)
|
||||
// Calcula el frame correspondiente a la animación
|
||||
void AnimatedSprite::animate()
|
||||
{
|
||||
if (!enabled || animation[currentAnimation].speed == 0)
|
||||
if (!enabled_ || animation[currentAnimation].speed == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -253,7 +253,7 @@ void AnimatedSprite::animate()
|
||||
else
|
||||
{
|
||||
// Escoge el frame correspondiente de la animación
|
||||
setSpriteClip(animation[currentAnimation].frames[animation[currentAnimation].currentFrame]);
|
||||
setClip(animation[currentAnimation].frames[animation[currentAnimation].currentFrame]);
|
||||
|
||||
// Incrementa el contador de la animacion
|
||||
animation[currentAnimation].counter++;
|
||||
@@ -280,7 +280,7 @@ void AnimatedSprite::setCurrentFrame(int num)
|
||||
animation[currentAnimation].counter = 0;
|
||||
|
||||
// Escoge el frame correspondiente de la animación
|
||||
setSpriteClip(animation[currentAnimation].frames[animation[currentAnimation].currentFrame]);
|
||||
setClip(animation[currentAnimation].frames[animation[currentAnimation].currentFrame]);
|
||||
}
|
||||
|
||||
// Establece el valor del contador
|
||||
@@ -459,13 +459,13 @@ bool AnimatedSprite::loadFromVector(std::vector<std::string> *source)
|
||||
// Normaliza valores
|
||||
if (framesPerRow == 0 && frameWidth > 0)
|
||||
{
|
||||
framesPerRow = texture->getWidth() / frameWidth;
|
||||
framesPerRow = texture_->getWidth() / frameWidth;
|
||||
}
|
||||
|
||||
if (maxTiles == 0 && frameWidth > 0 && frameHeight > 0)
|
||||
{
|
||||
const int w = texture->getWidth() / frameWidth;
|
||||
const int h = texture->getHeight() / frameHeight;
|
||||
const int w = texture_->getWidth() / frameWidth;
|
||||
const int h = texture_->getHeight() / frameHeight;
|
||||
maxTiles = w * h;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user