mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 21:41:50 +00:00
refactor Entities
This commit is contained in:
parent
36a522bee0
commit
3eae377024
23 changed files with 485 additions and 348 deletions
22
src/objects/Rigidbody.hpp
Normal file
22
src/objects/Rigidbody.hpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
|
||||
#include "data/dv_fwd.hpp"
|
||||
#include "physics/Hitbox.hpp"
|
||||
|
||||
#include <vector>
|
||||
#include <entt/fwd.hpp>
|
||||
|
||||
class Entities;
|
||||
struct EntityDef;
|
||||
|
||||
struct Rigidbody {
|
||||
bool enabled = true;
|
||||
Hitbox hitbox;
|
||||
std::vector<Sensor> sensors;
|
||||
|
||||
dv::value serialize(bool saveVelocity, bool saveBodySettings) const;
|
||||
|
||||
void initialize(
|
||||
const EntityDef& def, entityid_t id, Entities& entities
|
||||
);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue