diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-08 14:52:06 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-08 14:52:06 +0100 |
commit | fbd7c84e13381922bf327e20c1abc65337142445 (patch) | |
tree | f48bcf5527b9df45cdbc2ba4ab2dab4ab8ea921c /game/coins/CoinSubScene.cpp | |
parent | d989c1c51bf4d4fbb301493e73bc77e1873143b2 (diff) | |
parent | 91366375a7b2a9be670e4842604512254a9c116e (diff) |
Merge branch 'master' into niels/game
Diffstat (limited to 'game/coins/CoinSubScene.cpp')
-rw-r--r-- | game/coins/CoinSubScene.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/game/coins/CoinSubScene.cpp b/game/coins/CoinSubScene.cpp index 2c9feb6..d154819 100644 --- a/game/coins/CoinSubScene.cpp +++ b/game/coins/CoinSubScene.cpp @@ -39,6 +39,26 @@ int CoinSubScene::create(Scene & scn, int coin_counter) { .looping = true, } ); - coin.add_component<AudioSource>(Asset {"asset/sfx/coin_pickup_1.ogg"}); + coin.add_component<AudioSource>(Asset {"asset/sfx/coin_pickup_1.ogg"}).volume = 3; + + Sprite & pick_up = coin.add_component<Sprite>( + Asset {"asset/coin/coinCollect1_TVOS.png"}, + Sprite::Data { + .sorting_in_layer = SORT_IN_LAY_COINS, + .order_in_layer = 1, + .size = size * 2, + } + ); + pick_up.active = false; + coin.add_component<Animator>( + pick_up, ivec2 {64, 64}, uvec2 {5, 1}, + Animator::Data { + .fps = 5, + .looping = false, + } + ) + .active + = false; + return coin_counter; } |