|
RType
|
#include <MusicComponent.hpp>


Public Member Functions | |
| MusicComponent (ClientCore *core, std::shared_ptr< ClientSocket > socket) | |
| Construct a new Music Component:: Music Component object. More... | |
| ~MusicComponent () override | |
| Destroy the Music Component:: Music Component object. More... | |
| void | action () override |
| action, play the music More... | |
| void | display (sf::RenderWindow &window) override |
| Display the Music Component. More... | |
| void | setSound (const std::string &path) |
| setSound set the sound of the component More... | |
| bool | isPlaying () const |
| isPlaying More... | |
| bool | getLoop () const |
| getLoop More... | |
| float | getVolume () const |
| getVolume More... | |
| bool | getPersistant () const |
| getPersistant More... | |
| void | setLoop (bool loop) |
| setLoop More... | |
| void | setPaused (bool paused) |
| setPaused More... | |
| void | setVolume (float volume) |
| setVolume More... | |
| void | setPersistant (bool persistant) |
| setPersistant More... | |
| void | stop () |
| stop, stop the music More... | |
| void | handleEvent (const sf::Event &event, sf::RenderWindow &window) override |
| handleEvent, handle the event More... | |
| void | handleClick () |
| handleClick, handle the click More... | |
Public Member Functions inherited from AComponent | |
| AComponent (ClientCore *clientCore) | |
| AComponent, constructor of AComponent. More... | |
| ~AComponent () override=default | |
| ~AComponent, destructor of AComponent More... | |
| ComponentType | getType () const override |
| getType, get the type of the component More... | |
| void | addActionTarget (std::shared_ptr< IComponent > component) override |
| addActionTarget, add a target to the action More... | |
| void | addSubComponent (std::shared_ptr< IComponent > component) override |
| addSubComponent, add a sub component More... | |
| void | setAttribute (std::string attribute) override |
| setAttribute, set the attribute More... | |
| std::string | getAttribute () override |
| getAttribute, get the attribute More... | |
Public Member Functions inherited from IComponent | |
| IComponent (ClientCore *clientCore) | |
| IComponent, constructor of IComponent. More... | |
| virtual | ~IComponent ()=default |
| ~IComponent, destructor of IComponent More... | |
Additional Inherited Members | |
Protected Attributes inherited from IComponent | |
| std::string | _attribute |
| ComponentType | _type |
| std::vector< std::shared_ptr< IComponent > > | action_target |
| std::vector< std::shared_ptr< IComponent > > | sub_components |
| ClientCore * | _clientCore |
Definition at line 13 of file MusicComponent.hpp.
|
explicit |
Construct a new Music Component:: Music Component object.
| core | |
| socket |
Definition at line 17 of file MusicComponent.cpp.
References IComponent::_clientCore, IComponent::_type, AComponent::AComponent(), and MUSIC.

|
override |
Destroy the Music Component:: Music Component object.
Definition at line 33 of file MusicComponent.cpp.
|
overridevirtual |
|
overridevirtual |
Display the Music Component.
| window |
Implements IComponent.
Definition at line 43 of file MusicComponent.cpp.
| bool MusicComponent::getLoop | ( | ) | const |
getLoop
getLoop get the music loop
Definition at line 91 of file MusicComponent.cpp.
| bool MusicComponent::getPersistant | ( | ) | const |
getPersistant
getPersistant get the music persistant
Definition at line 171 of file MusicComponent.cpp.
| float MusicComponent::getVolume | ( | ) | const |
getVolume
getVolume get the music volume
Definition at line 100 of file MusicComponent.cpp.
| void MusicComponent::handleClick | ( | ) |
|
overridevirtual |
handleEvent, handle the event
handle Event for the Music Component
| event | |
| window |
Implements IComponent.
Definition at line 63 of file MusicComponent.cpp.
| bool MusicComponent::isPlaying | ( | ) | const |
isPlaying
isPlaying,
Definition at line 81 of file MusicComponent.cpp.
| void MusicComponent::setLoop | ( | bool | loop | ) |
setLoop
setLoop set the music loop
| loop |
Definition at line 109 of file MusicComponent.cpp.
| void MusicComponent::setPaused | ( | bool | paused | ) |
setPaused
setPaused set the music paused
| paused |
Definition at line 118 of file MusicComponent.cpp.
| void MusicComponent::setPersistant | ( | bool | persistant | ) |
setPersistant
setPersistant set the music persistant
| persistant |
Definition at line 162 of file MusicComponent.cpp.
| void MusicComponent::setSound | ( | const std::string & | path | ) |
setSound set the sound of the component
set the Sound
| path |
Definition at line 71 of file MusicComponent.cpp.
| void MusicComponent::setVolume | ( | float | volume | ) |
setVolume
setVolume set the music volume
| volume |
Definition at line 136 of file MusicComponent.cpp.
| void MusicComponent::stop | ( | ) |
stop, stop the music
Definition at line 152 of file MusicComponent.cpp.