mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-30 09:08:35 +00:00
doesn't compile
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <Component/Collision/CollisionComponent.hpp>
|
||||
#include <Component/Collision/CollisionComponent.hpp>
|
||||
#include <Component/Controllable/ControllableComponent.hpp>
|
||||
#include "Component/Speed/SpeedComponent.hpp"
|
||||
#include <Component/Bonus/PlayerBonusComponent.hpp>
|
||||
#include "Component/Movable/MovableComponent.hpp"
|
||||
#include "Bonus.hpp"
|
||||
@@ -40,11 +41,11 @@ namespace BBM {
|
||||
{
|
||||
if (bonus.shouldDelete() || axis != CollisionComponent::CollidedAxis::ALL)
|
||||
return;
|
||||
auto *controllable = player.tryGetComponent<ControllableComponent>();
|
||||
auto *speed = player.tryGetComponent<SpeedComponent>();
|
||||
auto *playerBonus = player.tryGetComponent<PlayerBonusComponent>();
|
||||
if (!controllable || !playerBonus)
|
||||
if (!speed || !playerBonus)
|
||||
return;
|
||||
controllable->speed += 0.025f;
|
||||
speed->speed += 0.025f;
|
||||
const_cast<WAL::Entity &>(bonus).scheduleDeletion();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user