mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-27 08:13:18 +00:00
add bonus speed limit
This commit is contained in:
@@ -44,7 +44,9 @@ namespace BBM {
|
||||
auto *playerBonus = player.tryGetComponent<PlayerBonusComponent>();
|
||||
if (!controllable || !playerBonus)
|
||||
return;
|
||||
controllable->speed += 0.025f;
|
||||
if (controllable->speed >= 0.4)
|
||||
return;
|
||||
controllable->speed = 0.025f;
|
||||
const_cast<WAL::Entity &>(bonus).scheduleDeletion();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user