mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
update entity script semantics
This commit is contained in:
parent
c54be7b2b1
commit
fc3994446a
11 changed files with 193 additions and 69 deletions
|
|
@ -6,13 +6,6 @@
|
|||
|
||||
#include "../typedefs.hpp"
|
||||
|
||||
struct entity_funcs_set {
|
||||
bool init : 1;
|
||||
bool on_spawn : 1;
|
||||
bool on_despawn : 1;
|
||||
bool on_grounded : 1;
|
||||
};
|
||||
|
||||
struct EntityDef {
|
||||
/// @brief Entity string id (with prefix included)
|
||||
std::string const name;
|
||||
|
|
@ -22,8 +15,7 @@ struct EntityDef {
|
|||
|
||||
struct {
|
||||
entityid_t id;
|
||||
entity_funcs_set funcsset;
|
||||
} rt;
|
||||
} rt {};
|
||||
|
||||
EntityDef(const std::string& name) : name(name) {}
|
||||
EntityDef(const EntityDef&) = delete;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue