mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
Spawn different objects withing level
This commit is contained in:
parent
7434cb66e8
commit
4a4b80bef3
9 changed files with 85 additions and 18 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include "../voxels/voxel.h"
|
||||
#include "../settings.h"
|
||||
#include "../interfaces/Serializable.h"
|
||||
#include "../objects/Object.h"
|
||||
|
||||
class Camera;
|
||||
class Hitbox;
|
||||
|
|
@ -32,7 +33,7 @@ struct PlayerInput {
|
|||
bool flight;
|
||||
};
|
||||
|
||||
class Player : Serializable {
|
||||
class Player : Object, Serializable {
|
||||
float speed;
|
||||
int chosenSlot;
|
||||
glm::vec3 spawnpoint {};
|
||||
|
|
@ -52,7 +53,7 @@ public:
|
|||
~Player();
|
||||
|
||||
void teleport(glm::vec3 position);
|
||||
void update(Level* level, PlayerInput& input, float delta);
|
||||
void updateInput(Level* level, PlayerInput& input, float delta);
|
||||
|
||||
void attemptToFindSpawnpoint(Level* level);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue