Commit de vesprà tirada a la brossa
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
#include "item.h"
|
||||
#include <stdlib.h> // for rand
|
||||
#include "animated_sprite.h" // for AnimatedSprite
|
||||
#include "animated_sprite.h" // for SpriteAnimated
|
||||
#include "param.h" // for param
|
||||
class Texture;
|
||||
|
||||
// Constructor
|
||||
Item::Item(ItemType type, float x, float y, SDL_Rect *play_area, std::shared_ptr<Texture> texture, std::vector<std::string> *animation)
|
||||
: sprite_(std::make_unique<AnimatedSprite>(texture, "", animation)),
|
||||
: sprite_(std::make_unique<AnimatedSprite>(texture, animation)),
|
||||
accel_x_(0.0f),
|
||||
floor_collision_(false),
|
||||
type_(type),
|
||||
@@ -144,7 +144,7 @@ void Item::disable()
|
||||
void Item::update()
|
||||
{
|
||||
move();
|
||||
sprite_->animate();
|
||||
sprite_->update();
|
||||
updateTimeToLive();
|
||||
checkTimeToLive();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user