summary refs log tree commit diff stats
path: root/src/components/player_sprite.h
blob: b1ac0af61a82a743fce4d566d25704d366591ae8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef PLAYER_SPRITE_H
#define PLAYER_SPRITE_H

#include "entity.h"
#include "renderer.h"

class Game;

class PlayerSpriteComponent : public Component {
  public:
    PlayerSpriteComponent();
    void render(Game& game, Entity& entity, Texture& buffer);
    void receive(Game& game, Entity& entity, const Message& msg);
    
  private:
    Texture sprite;
    int animFrame = 0;
    bool facingLeft = false;
    bool isMoving = false;
    bool dying = false;
};

#endif