basic movement
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user