add Rigidbody.is_enabled, .set_enabled

This commit is contained in:
MihailRis
2024-06-27 08:23:01 +03:00
parent 1ca0761f49
commit 6d7f950410
3 changed files with 32 additions and 7 deletions
+7 -2
View File
@@ -22,6 +22,11 @@ struct Transform {
void refresh();
};
struct Rigidbody {
bool enabled = true;
Hitbox hitbox;
};
class Level;
class Assets;
class LineBatch;
@@ -45,8 +50,8 @@ public:
return registry.get<Transform>(entity);
}
Hitbox& getHitbox() const {
return registry.get<Hitbox>(entity);
Rigidbody& getRigidbody() const {
return registry.get<Rigidbody>(entity);
}
entityid_t getUID() const {