Empezando con los actores y polimorfismo. Ya pinta la plataforma movil

This commit is contained in:
2022-08-26 13:36:31 +02:00
parent aea71599ff
commit a4000d25db
12 changed files with 120 additions and 108 deletions

View File

@@ -2,6 +2,11 @@
#include <fstream>
#include <sstream>
// Constructor
Actor::Actor()
{
}
// Constructor
Actor::Actor(actor_t actor)
{
@@ -23,7 +28,6 @@ Actor::Actor(actor_t actor)
// Inicializa el sprite con el resto de parametros comunes
sprite->setWidth(actor.w);
sprite->setHeight(actor.h);
sprite->setCurrentAnimation("walk");
sprite->setFlip(actor.vx>0?SDL_FLIP_NONE:SDL_FLIP_HORIZONTAL);
}