Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <SFML\Graphics.hpp>
- #include <iostream>
- class Animation : public sf::Drawable, public sf::Transformable
- {
- public:
- Animation(std::string player, std::string anim, int dir, int frame, int delay, sf::Vector2i size);
- void update(sf::Clock &clock);
- private:
- virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const;
- sf::Sprite m_sprite;
- sf::Texture m_texture;
- std::string m_path;
- int m_frame;
- int m_delay;
- int m_dir;
- int m_index;
- sf::Vector2i m_size;
- std::vector<sf::Image> m_frameUP;
- std::vector<sf::Image> m_frameRI;
- std::vector<sf::Image> m_frameDO;
- std::vector<sf::Image> m_frameLE;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement