Dont add MovementComponent to animation example
This commit is contained in:
parent
542974caa7
commit
f237cf9eff
|
@ -19,14 +19,12 @@ class PlayerEntity : public simpleengine::Entity {
|
||||||
private:
|
private:
|
||||||
sf::Sprite sprite;
|
sf::Sprite sprite;
|
||||||
sf::Texture texture;
|
sf::Texture texture;
|
||||||
float movement_speed = 95;
|
float movement_speed = 150;
|
||||||
sf::Vector2u window_size;
|
sf::Vector2u window_size;
|
||||||
|
|
||||||
std::unique_ptr<simpleengine::SideScrollerMovementAnimationComponent> move_anim_component;
|
std::unique_ptr<simpleengine::SideScrollerMovementAnimationComponent> move_anim_component;
|
||||||
public:
|
public:
|
||||||
explicit PlayerEntity(sf::Vector2u window_size) : window_size(window_size) {
|
explicit PlayerEntity(sf::Vector2u window_size) : window_size(window_size) {
|
||||||
AddComponent(std::make_unique<simpleengine::MovementComponent>(*this, movement_speed));
|
|
||||||
|
|
||||||
texture.loadFromFile("player_sheet.png");
|
texture.loadFromFile("player_sheet.png");
|
||||||
sprite.setTexture(texture);
|
sprite.setTexture(texture);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue