mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
add on_update, on_render to docs & change entities tps to 20
This commit is contained in:
parent
3f67944cc2
commit
f8907f7db1
10 changed files with 62 additions and 21 deletions
|
|
@ -167,6 +167,7 @@ class Entities {
|
|||
std::unordered_map<entt::entity, entityid_t> uids;
|
||||
entityid_t nextID = 1;
|
||||
util::Clock sensorsTickClock;
|
||||
util::Clock updateTickClock;
|
||||
|
||||
void updateSensors(
|
||||
Rigidbody& body, const Transform& tsf, std::vector<Sensor*>& sensors
|
||||
|
|
@ -183,10 +184,10 @@ public:
|
|||
|
||||
void clean();
|
||||
void updatePhysics(float delta);
|
||||
void update();
|
||||
void update(float delta);
|
||||
|
||||
void renderDebug(LineBatch& batch, const Frustum& frustum, const DrawContext& ctx);
|
||||
void render(Assets* assets, ModelBatch& batch, const Frustum& frustum, bool pause);
|
||||
void render(Assets* assets, ModelBatch& batch, const Frustum& frustum, float delta, bool pause);
|
||||
|
||||
entityid_t spawn(
|
||||
EntityDef& def,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue