Guest User

Entity.hpp

a guest
Dec 8th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.11 KB | None | 0 0
  1. #ifndef ENTITY_HPP
  2. #define ENTITY_HPP
  3.  
  4. namespace Alice
  5. {
  6.     class Entity
  7.     {
  8.         private:
  9.             /* Приватные поля */
  10.             sf::Texture _texture;
  11.             sf::Sprite _sprite;
  12.             std::string _name;
  13.             sf::Vector2i _position;
  14.             sf::Vector2i _size;
  15.             sf::Vector2i _hitboxSize;
  16.             float _speed;
  17.             float _timeStep;
  18.            
  19.         public:
  20.             /* Конструктор-деструктор */
  21.             Entity();
  22.             Entity(std::string filePath);
  23.  
  24.             /* Сеттеры */
  25.             void SetTexture(std::string filePath);
  26.             void SetName(std::string name);
  27.             void SetPosition(sf::Vector2i position);
  28.             void SetSize(sf::Vector2i size);
  29.             void SetHitboxSize(sf::Vector2i hitboxSize);
  30.             void SetSpeed(float speed);
  31.             void SetTimeSteep(float timeStep);
  32.  
  33.             /* Геттеры */
  34.             sf::Sprite GetTexture(void);
  35.             std::string GetName(void);
  36.             sf::Vector2i GetPosition(void);
  37.             sf::Vector2i GetSize(void);
  38.             sf::Vector2i GetHitboxSize(void);
  39.             float GetSpeed(void);
  40.             float GetTimeSteep(void);
  41.  
  42.             /* Логика */
  43.             void Update(void);
  44.             void Draw(void);
  45.             virtual void UserEvent(void);
  46.     };
  47. }
  48.  
  49. #endif //!ENTITY_HPP
Add Comment
Please, Sign In to add comment