- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSleepAwakeMgr.cpp
More file actions
Latest commit
26 lines (23 loc) · 685 Bytes
/
Copy pathSleepAwakeMgr.cpp
File metadata and controls
26 lines (23 loc) · 685 Bytes
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
#include"SleepAwakeMgr.h"
SleepAwakeMgr::SleepAwakeMgr() {
}
voidSleepAwakeMgr::Sleep(intID, God &gd) {
Player *tmp_pl = gd.GetPlayerById(ID);
tmp_pl->SetAwake(false);
}
voidSleepAwakeMgr::Awake(intID, God &gd) {
Player *tmp_pl = gd.GetPlayerById(ID);
tmp_pl->SetAwake(true);
}
voidSleepAwakeMgr::CitySleep(God &gd) {
for (registerint i = 0; i < gd.GetNoOfPlayers(); i++) {
Player *tmp_pl = gd.GetPlayerByIndex(i);
tmp_pl->SetAwake(false);
}
}
voidSleepAwakeMgr::CityAwake(God &gd) {
for (registerint i = 0; i < gd.GetNoOfPlayers(); i++) {
Player *tmp_pl = gd.GetPlayerByIndex(i);
tmp_pl->SetAwake(true);
}
}