mirror of
https://github.com/zoriya/Bomberman.git
synced 2025-12-18 20:35:12 +00:00
Remove friend keyword and put variables in public instead Fix documentation where the name of the component is not specified Co-Authored-By: Benjamin HENRY <44569175+EternalRat@users.noreply.github.com>
45 lines
1.2 KiB
C++
45 lines
1.2 KiB
C++
//
|
|
// Created by Tom Augier on 2021-05-20.
|
|
// Edited by Benjamin Henry on 2021-05-20.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#include "lib/wal/sources/Component/Component.hpp"
|
|
#include "lib/wal/sources/Entity/Entity.hpp"
|
|
|
|
namespace BBM
|
|
{
|
|
class ControllableComponent : public WAL::Component
|
|
{
|
|
public:
|
|
//! @brief input value for X axe
|
|
float moveX = 0;
|
|
//! @brief input value for Z axe
|
|
float moveZ = 0;
|
|
//! @brief input value for jump
|
|
bool jump = false;
|
|
//! @brief input value for bomb
|
|
bool bomb = false;
|
|
//! @brief input value for pause
|
|
bool pause = false;
|
|
|
|
//! @inherit
|
|
WAL::Component *clone(WAL::Entity &entity) const override;
|
|
|
|
//! @brief A Controllable component can't be instantiated, it should be derived.
|
|
explicit ControllableComponent(WAL::Entity &entity);
|
|
|
|
//! @brief Constructor
|
|
ControllableComponent(WAL::Entity &entity, unsigned int maxBombCount);
|
|
|
|
//! @brief A Controllable component can't be instantiated, it should be derived.
|
|
ControllableComponent(const ControllableComponent &) = default;
|
|
|
|
//! @brief default destructor
|
|
~ControllableComponent() override = default;
|
|
|
|
//! @brief A Controllable omponent can't be assigned
|
|
ControllableComponent &operator=(const ControllableComponent &) = delete;
|
|
};
|
|
} |