forked from jaildesigner-jailgames/jaildoctors_dilemma
Animaciones precacheadas
This commit is contained in:
@@ -15,8 +15,8 @@ Player::Player(player_t ini, std::string png, std::string animation, SDL_Rendere
|
||||
this->options = options;
|
||||
|
||||
// Crea objetos
|
||||
texture = resource->getTexture(png);
|
||||
sprite = new AnimatedSprite(texture, renderer, animation);
|
||||
//texture = resource->getTexture(png);
|
||||
sprite = new AnimatedSprite(renderer, resource->getAnimation(animation));
|
||||
|
||||
// Inicializa variables
|
||||
color = stringToColor(options->palette, "white");
|
||||
@@ -688,7 +688,8 @@ player_t Player::getSpawnParams()
|
||||
// Recarga la textura
|
||||
void Player::reLoadTexture()
|
||||
{
|
||||
texture->reLoad();
|
||||
sprite->getTexture()->reLoad();
|
||||
//texture->reLoad();
|
||||
}
|
||||
|
||||
// Recarga la paleta
|
||||
|
||||
Reference in New Issue
Block a user