rename Bonus folder => Items folder (bonus/malus should be inside)

This commit is contained in:
HENRY Benjamin
2021-06-03 10:42:09 +02:00
parent 6134ab9352
commit 82e1f06534
3 changed files with 1 additions and 1 deletions
+49
View File
@@ -0,0 +1,49 @@
//
// Created by HENRY Benjamin on 02/06/2021.
//
#include "Component/Movable/MovableComponent.hpp"
#include "Bonus.hpp"
//#include "Component/BombHolderComponent/BombHolderComponent.hpp"
namespace BBM {
void Bonus::BombUpBonus(WAL::Entity &player, const WAL::Entity &bonus)
{
/* if (player.hasComponent<BombHolderComponent>()) {
auto &bombHolder = player.getComponent<BombHolderComponent>();
bombHolder.maxBombCount++;
} */
}
void Bonus::DamageIncreasedBonus(WAL::Entity &player, const WAL::Entity &bonus)
{
/* if (player.hasComponent<BombHolderComponent>()) {
auto &bombHolder = player.getComponent<BombHolderComponent>();
bombHolder.damage++;
} */
}
void Bonus::ExplosionRangeBonus(WAL::Entity &player, const WAL::Entity &bonus)
{
/* if (player.hasComponent<BombHolderComponent>()) {
auto &bombHolder = player.getComponent<BombHolderComponent>();
bombHolder.explosionRange++;
} */
}
void Bonus::SpeedUpBonus(WAL::Entity &player, const WAL::Entity &bonus)
{
if (!player.hasComponent<MovableComponent>())
return;
auto &movable = player.getComponent<MovableComponent>();
movable.addForce(Vector3f(1, 0, 1));
}
void Bonus::IgnoreWallsBonus(WAL::Entity &player, const WAL::Entity &bonus)
{
/* if (player.hasComponent<BombHolderComponent>()) {
auto &bombHolder = player.getComponent<BombHolderComponent>();
bombHolder.ignoreWalls = true;
} */
}
}