game_manager.rs 368 Bytes
Newer Older
Rahix's avatar
Rahix committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
pub struct GameManager {
    return_to_heaven: bool,
}

impl GameManager {
    pub fn new() -> GameManager {
        GameManager {
            return_to_heaven: false,
        }
    }

    pub fn request_return_to_heaven(&mut self) {
        self.return_to_heaven = true;
    }

    pub fn wants_return_to_heaven(&self) -> bool {
        self.return_to_heaven
    }
}