From 26d66b7a73ac8d172d342be03bd75bd5bea221e1 Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Sat, 28 Dec 2024 16:22:58 +0100 Subject: coin system --- game/coins/CoinSystem.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 game/coins/CoinSystem.h (limited to 'game/coins/CoinSystem.h') diff --git a/game/coins/CoinSystem.h b/game/coins/CoinSystem.h new file mode 100644 index 0000000..93cbf98 --- /dev/null +++ b/game/coins/CoinSystem.h @@ -0,0 +1,22 @@ +#pragma once + +#include "CoinData.h" +#include "api/Scene.h" +#include "api/Script.h" +#include "api/Sprite.h" +#include "types.h" +#include +#include + +class CoinSystem { +public: + void create_coins(crepe::Scene & scn); + void add_location(const crepe::vec2& location); + void remove_location(const std::string& name); + void update(float position,crepe::RefVector coin_sprites,crepe::RefVector coin_colliders,crepe::RefVector coin_metadatas); +private: + static constexpr float SPAWN_DISTANCE = 200; + static constexpr float SPAWN_AREA = 50; + static constexpr int MAXIMUM_AMOUNT = 100; + static std::vector coin_locations; +}; -- cgit v1.2.3