-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMeTimelineSoundEvent.h
65 lines (50 loc) · 1.46 KB
/
MeTimelineSoundEvent.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#pragma once
#include <MeFoundation/MeFoundationPCH.h>
#include <MeFoundation/MeTimelineShadeEvent.h>
/// Play a sound
class MEFOUNDATION_ENTRY MeTimelineSoundEvent : public MeTimelineShadeEvent
{
// Construction.
public:
/// Constructor.
MeTimelineSoundEvent(){
m_nSoundIndex = -1;
m_bLoop = false;
}
/// Destructor.
virtual ~MeTimelineSoundEvent(){}
/// Copy constructor.
MeTimelineSoundEvent( const MeTimelineSoundEvent& kClass ){}
// Overload operator.
public:
/// Assignment operator.
const MeTimelineSoundEvent& operator=( const MeTimelineSoundEvent& kClass ){ return *this; }
/// Reset event.
virtual void ResetEvent();
// Override.
public:
/// Destroy.
virtual void DestroyEvent(){}
// Override.
protected:
virtual void UpdateBeginToFull( const MeTimeValue& kTime );
virtual void UpdateInFull( const MeTimeValue& kTime );
virtual void UpdateFullToEnd( const MeTimeValue& kTime );
/// Update event.
virtual void DoFirstInRunning( const MeTimeValue& kTime );
virtual void UpdateEventInEnd( const MeTimeValue& kTime );
// Methods.
public:
/// Set sound filename.
void SetSoundFilename( const std::string& strFilename ){ m_strSoundFilename = strFilename; }
/// Set loop config.
void SetLoop( bool bLoop ){ m_bLoop = bLoop; }
// Members.
protected:
/// Sound full path filename.
std::string m_strSoundFilename;
/// Is loop.
bool m_bLoop;
/// Sound index.
int m_nSoundIndex;
};