implement ship behaviors
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
#include <QVector2D>
|
||||
@@ -14,8 +15,9 @@ class ScrapSystem
|
||||
public:
|
||||
explicit ScrapSystem(std::function<EntityId()> allocateId);
|
||||
|
||||
EntityId spawn(QVector2D position, int amount, Tick despawnAt);
|
||||
void tickDespawn(Tick currentTick);
|
||||
EntityId spawn(QVector2D position, int amount, Tick despawnAt);
|
||||
void tickDespawn(Tick currentTick);
|
||||
std::optional<Scrap> consume(EntityId id); // removes and returns scrap, or nullopt
|
||||
|
||||
const Scrap* findScrap(EntityId id) const;
|
||||
std::vector<Scrap> allScraps() const;
|
||||
|
||||
Reference in New Issue
Block a user