-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNoticeManager.h
60 lines (59 loc) · 984 Bytes
/
NoticeManager.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
#pragma once
#include"VirtualSkill.h"
#include <vector>
#include "NoticeUnit.h"
#include "SFXManager.h"
using namespace std;
class NoticeManager
{
public:
~NoticeManager();
static NoticeManager& GetNoticeManager()
{
static NoticeManager ObjPool;
ObjPool.AssureInitialized();
return ObjPool;
}
void InsertNotice(const char* title, const char* main);
void Update();
void Clean()
{
for (int i = 0; i<queue.size(); i++)
{
delete queue[i];
queue.erase(queue.begin() + i);
}
queue.clear();
};
void Exit()
{
Clean();
delete left;
delete right;
delete font;
delete font2;
}
bool IsOccopied()const
{
if (queue.size() > 0)
return true;
else
return false;
};
private:
NoticeManager();
bool m_bHasInitialized;
void AssureInitialized()
{
while (!m_bHasInitialized)
Sleep(0);
};
vector<NoticeUnit*> queue;
bool occupied;
int leftx,rightx;
float alpha;
hgeSprite *left;
hgeSprite *right;
hgeFont *font;
hgeFont *font2;
};