Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <SFML\Graphics.hpp>
- #include "Animation.h"
- #include "Collider.h"
- class Player
- {
- public:
- Player(sf::Texture* texture, sf::Vector2u imageCount, float switchTime, int maxCount, float speed);
- ~Player();
- Collider& getCollider() {
- return m_myCollider;
- }
- void Update(float deltaTime);
- void Draw(sf::RenderWindow& window); //new draw instance so we dont have to use a getter in out main.cpp for the players
- sf::Vector2f GetPosition() {
- return body.getPosition();
- }
- Collider & GetCollider() {
- return Collider(body);
- }
- private:
- sf::RectangleShape body;
- Animation animation;
- unsigned int row;
- float speed;
- bool faceRight;
- Collider m_myCollider;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement