namespace systems {
class EnnemiesMilepatesSystem : public ISystems {
public:
void operator()(Registry &, std::shared_ptr<IContext> ctx) override;
void createMilepates(Registry &r, std::shared_ptr<IContext> &ctx);
int countMilepates(Registry &r);
std::deque<std::pair<int, int>> positionHistory;
};
}; // namespace systems
operator():
Updates the enemy milestones during each game cycle.
Registry: Manages entities and components, including enemies and their milestones.IContext: Provides game context, which may influence enemy behavior or milestone definitions.createMilepates:
Creates new milestones for enemies based on specific conditions or game state.
Registry: Manages entities and components related to enemies and their milestones.IContext: Context for additional game state that may affect milestone creation.countMilepates:
Counts the total number of milestones for the enemies.
Registry: Holds and tracks enemy entities and their associated milestones.positionHistory:A deque that stores the historical positions of milestones as pairs of integers, allowing tracking of enemy movement over time.