diff options
Diffstat (limited to 'game/coins/CoinSystemScript.cpp')
-rw-r--r-- | game/coins/CoinSystemScript.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/game/coins/CoinSystemScript.cpp b/game/coins/CoinSystemScript.cpp new file mode 100644 index 0000000..90405a8 --- /dev/null +++ b/game/coins/CoinSystemScript.cpp @@ -0,0 +1,18 @@ +#include "CoinSystemScript.h" +#include "CoinSystem.h" +#include "api/CircleCollider.h" +#include "api/Metadata.h" +#include "api/Transform.h" + +using namespace crepe; +using namespace std; + +void CoinSystemScript::frame_update(crepe::duration_t dt) +{ + float position = this->get_component<Transform>().position.x; + RefVector<Sprite> coin_sprites = this->get_components_by_tag<Sprite>("coin"); + RefVector<CircleCollider> coin_colliders = this->get_components_by_tag<CircleCollider>("coin"); + RefVector<Metadata> coin_metadatas = this->get_components_by_tag<Metadata>("coin"); + this->coin_system.update(position, coin_sprites, coin_colliders, coin_metadatas); +} + |