basic movement

This commit is contained in:
2026-03-14 22:27:54 +01:00
parent b19f595daf
commit 2983b919cd
24 changed files with 368 additions and 57 deletions

View File

@@ -2,6 +2,7 @@
#include <vector>
#include <memory>
#include <functional>
#include <utils.hpp>
#include <object/entity.hpp>
#include <mutex>
@@ -18,6 +19,10 @@ namespace Game::State {
fn(mEntities);
}
void sort(); // Sort entities by zIndex for correct rendering order
Object::Entity* getEntityByName(const std::string& name); // Get an entity by name, returns nullptr if no entity with the name exists
std::vector<Object::Entity*> getEntitiesSnapshot(bool sortByZIndex = false); // Get a stable snapshot of entity pointers for iteration outside the lock
// Update entity at index, by REFERENCE.
Object::Entity* getAtIndex(size_t at);
// Add an entity to the gamestate.