Finishing the replay button

This commit is contained in:
Zoe Roux
2021-06-17 22:31:21 +02:00
parent a886b50239
commit d424c07744
17 changed files with 59 additions and 64 deletions
@@ -12,7 +12,7 @@ namespace BBM
: WAL::Component(entity),
_modelAnimation(path),
_currentAnimIndex(animIndex),
_animDisabled(play)
_animDisabled(!play)
{
this->_modelAnimation[this->_currentAnimIndex].setFrameCounter(0);
}
@@ -7,11 +7,17 @@
namespace BBM
{
ControllableComponent::ControllableComponent(WAL::Entity &entity)
: WAL::Component(entity)
: WAL::Component(entity),
disabled(false)
{}
WAL::Component *ControllableComponent::clone(WAL::Entity &entity) const
{
return new ControllableComponent(entity);
}
ControllableComponent::ControllableComponent(WAL::Entity &entity, bool isDisabled)
: WAL::Component(entity),
disabled(isDisabled)
{}
}
@@ -29,6 +29,9 @@ namespace BBM
AI
};
//! @brief True if the entity should not be controllable.
bool disabled;
//! @brief The X and Z abscis of the movement.
Vector2f move;
//! @brief input value to select
@@ -47,6 +50,8 @@ namespace BBM
//! @brief Initialize a new controllable component.
explicit ControllableComponent(WAL::Entity &entity);
//! @brief Initialize a new controllable component.
ControllableComponent(WAL::Entity &entity, bool isDisabled);
//! @brief A Controllable component is copy constructable.
ControllableComponent(const ControllableComponent &) = default;
//! @brief default destructor