added player class to simplify player creation, need to make it a child of a rect so that way I can make groups of all elements
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#ifndef PLAYER_HPP
|
||||
#define PLAYER_HPP
|
||||
|
||||
#include <SFML/Graphics/RectangleShape.hpp>
|
||||
#include <SFML/System/Vector2.hpp>
|
||||
|
||||
class Player {
|
||||
public:
|
||||
Player(sf::Vector2<float> size, sf::Vector2<float> starting_position, float acceleration, float initial_acceleration, float thickness, float velocity_x);
|
||||
sf::RectangleShape rect;
|
||||
sf::Vector2<float> m_size;
|
||||
sf::Vector2<float> m_velocity;
|
||||
float m_acceleration;
|
||||
float m_jump_strength;
|
||||
float m_thickness;
|
||||
bool m_jumping;
|
||||
sf::Vector2<float> get_velocity();
|
||||
bool get_jumping();
|
||||
|
||||
// private:
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user