Ketchup Engine
Loading...
Searching...
No Matches
SongPlayer Class Reference

#include <SongPlayer.h>

Inheritance diagram for SongPlayer:
Inheritance graph
Collaboration diagram for SongPlayer:
Collaboration graph

Public Member Functions

 SongPlayer ()
 
 SongPlayer (const SongPlayer &)=delete
 
SongPlayeroperator= (const SongPlayer &)=delete
 
 ~SongPlayer ()
 
void EnterScene () override
 Processes necessary for entering the Scene. Users should override as necessary and put X-able registration calls here, as well as any additional setup that is done per-entry.
 
void ExitScene () override
 Processes necessary for exiting the Scene. Users should override as necessary and put X-able deregistration calls here, as well as any additional cleanup that is done per-exit.
 
void Update () override
 Updates this Updatable. User should override this method as necessary.
 
void Draw2D () override
 Draws this Drawable's 2D KSprites. User should override this method as necessary.
 
void LoadSong (std::string path)
 
void Play ()
 
void Pause ()
 
void UpdateTime ()
 
float GetTime ()
 
- Public Member Functions inherited from GameObject
 GameObject ()
 
 GameObject (const GameObject &)=delete
 
GameObjectoperator= (const GameObject &)=delete
 
virtual ~GameObject ()
 
virtual void EnterScene ()
 Processes necessary for entering the Scene. Users should override as necessary and put X-able registration calls here, as well as any additional setup that is done per-entry.
 
virtual void ExitScene ()
 Processes necessary for exiting the Scene. Users should override as necessary and put X-able deregistration calls here, as well as any additional cleanup that is done per-exit.
 
void SubmitSceneEntry ()
 Submit scene entry to the currently active Scene.
 
void SubmitSceneExit ()
 Submit scene exit to the currently active Scene.
 
- Public Member Functions inherited from Updatable
 Updatable ()
 
 Updatable (const Updatable &)=delete
 
Updatableoperator= (const Updatable &)=delete
 
virtual ~Updatable ()
 
virtual void Update ()
 Updates this Updatable. User should override this method as necessary.
 
void SubmitRegistration ()
 Submit update registration to the currently active Scene.
 
void SubmitDeregistration ()
 Submit update deregistration from the currently active Scene.
 
- Public Member Functions inherited from Drawable
 Drawable ()
 
 Drawable (const Drawable &)=delete
 
Drawableoperator= (const Drawable &)=delete
 
virtual ~Drawable ()
 
virtual void Draw ()
 Draws this Drawable's 3D GraphicsObjects. User should override this method as necessary.
 
virtual void Draw2D ()
 Draws this Drawable's 2D KSprites. User should override this method as necessary.
 
void SubmitRegistration ()
 Submit draw registration to the currently active Scene.
 
void SubmitDeregistration ()
 Submit draw deregistration from the currently active Scene.
 
- Public Member Functions inherited from Inputable
 Inputable ()
 
 Inputable (const Inputable &)=delete
 
Inputableoperator= (const Inputable &)=delete
 
virtual ~Inputable ()
 
virtual void KeyPressed (AZUL_KEY k)
 Callback for KeyPressed event on a keyboard key. To be overridden by the user.
 
virtual void KeyReleased (AZUL_KEY k)
 Callback for KeyReleased event on a keyboard key. To be overridden by the user.
 
virtual void KeyPressed (AZUL_MOUSE m)
 Callback for KeyPressed event on a mouse button. To be overridden by the user.
 
virtual void KeyReleased (AZUL_MOUSE m)
 Callback for KeyReleased event on a mouse button. To be overridden by the user.
 
void SubmitRegistration (AZUL_KEY k, KeyEvent ev)
 Submit input registration for the specified AZUL_KEY and KeyEvent to the currently active Scene.
 
void SubmitDeregistration (AZUL_KEY k, KeyEvent ev)
 Submit input deregistration for the specified AZUL_KEY and KeyEvent from the currently active Scene.
 
void SubmitRegistration (AZUL_MOUSE m, KeyEvent ev)
 Submit input registration for the specified AZUL_MOUSE and KeyEvent to the currently active Scene.
 
void SubmitDeregistration (AZUL_MOUSE m, KeyEvent ev)
 Submit input deregistration for the specified AZUL_MOUSE and KeyEvent from the currently active Scene.
 
- Public Member Functions inherited from Collidable
 Collidable ()
 
 Collidable (const Collidable &)=delete
 
Collidableoperator= (const Collidable &)=delete
 
virtual ~Collidable ()
 
void SubmitRegistration ()
 Submit collision registration to the currently active Scene.
 
void SubmitDeregistration ()
 Submit collision deregistration from the currently active Scene.
 

Private Attributes

irrklang::ISound * p_song
 
SpriteStringp_timer
 
unsigned int m_len
 
float m_apparentTime
 
float m_lastSongTime
 
float m_timeSinceLastChange
 

Additional Inherited Members

- Public Types inherited from Inputable
using RegistrationID = std::pair< InputKey, KeyEvent >
 
using RegDataMap = std::map< RegistrationID, RegistrationData >
 
using RegDataMapPair = std::pair< RegistrationID, RegistrationData >
 
- Public Types inherited from Collidable
enum class  VOLUME_TYPE { BSPHERE , AABB }
 
- Protected Member Functions inherited from Collidable
const CollisionVolumeGetCollisionVolume ()
 Gets a const reference to the Collidable's BSphere.
 
void SetColliderModel (Model *m, VOLUME_TYPE volumeType)
 Sets the Collidable's collider model.
 
void UpdateCollisionData (const Matrix &m)
 Updates the collision data using the transform m.
 
template<typename C >
void SetCollidableGroup ()
 Sets collidable group.
 

Constructor & Destructor Documentation

◆ SongPlayer() [1/2]

SongPlayer::SongPlayer ( )

◆ SongPlayer() [2/2]

SongPlayer::SongPlayer ( const SongPlayer )
delete

◆ ~SongPlayer()

SongPlayer::~SongPlayer ( )

Member Function Documentation

◆ Draw2D()

void SongPlayer::Draw2D ( )
overridevirtual

Draws this Drawable's 2D KSprites. User should override this method as necessary.

Haru, 3/8/2023.

Reimplemented from Drawable.

◆ EnterScene()

void SongPlayer::EnterScene ( )
overridevirtual

Processes necessary for entering the Scene. Users should override as necessary and put X-able registration calls here, as well as any additional setup that is done per-entry.

Haru, 3/8/2023.

Reimplemented from GameObject.

◆ ExitScene()

void SongPlayer::ExitScene ( )
overridevirtual

Processes necessary for exiting the Scene. Users should override as necessary and put X-able deregistration calls here, as well as any additional cleanup that is done per-exit.

Haru, 3/8/2023.

Reimplemented from GameObject.

◆ GetTime()

float SongPlayer::GetTime ( )

◆ LoadSong()

void SongPlayer::LoadSong ( std::string  path)

◆ operator=()

SongPlayer & SongPlayer::operator= ( const SongPlayer )
delete

◆ Pause()

void SongPlayer::Pause ( )

◆ Play()

void SongPlayer::Play ( )

◆ Update()

void SongPlayer::Update ( )
overridevirtual

Updates this Updatable. User should override this method as necessary.

Haru, 3/8/2023.

Reimplemented from Updatable.

◆ UpdateTime()

void SongPlayer::UpdateTime ( )

Member Data Documentation

◆ m_apparentTime

float SongPlayer::m_apparentTime
private

◆ m_lastSongTime

float SongPlayer::m_lastSongTime
private

◆ m_len

unsigned int SongPlayer::m_len
private

◆ m_timeSinceLastChange

float SongPlayer::m_timeSinceLastChange
private

◆ p_song

irrklang::ISound* SongPlayer::p_song
private

◆ p_timer

SpriteString* SongPlayer::p_timer
private

The documentation for this class was generated from the following files: