'Player' class, separated main file
Moved render code to world_render.h, declarations code (assets and blocks) to declarations.h
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
#include "Player.h"
|
||||
#include "../physics/Hitbox.h"
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
Player::Player(glm::vec3 position, float speed, Camera* camera) :
|
||||
speed(speed),
|
||||
camera(camera){
|
||||
hitbox = new Hitbox(position, vec3(0.2f,0.9f,0.2f));
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef SRC_OBJECTS_PLAYER_H_
|
||||
#define SRC_OBJECTS_PLAYER_H_
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
class Camera;
|
||||
class Hitbox;
|
||||
|
||||
class Player {
|
||||
public:
|
||||
float speed;
|
||||
Camera* camera;
|
||||
Hitbox* hitbox;
|
||||
float camX, camY;
|
||||
Player(glm::vec3 position, float speed, Camera* camera);
|
||||
~Player();
|
||||
};
|
||||
|
||||
#endif /* SRC_OBJECTS_PLAYER_H_ */
|
||||
Reference in New Issue
Block a user