mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
14 lines
248 B
Rust
14 lines
248 B
Rust
#[derive(Copy, Clone, PartialEq, Eq)]
|
|
pub enum DayPeriod {
|
|
Night,
|
|
Morning,
|
|
Noon,
|
|
Evening,
|
|
}
|
|
|
|
impl DayPeriod {
|
|
pub fn is_dark(&self) -> bool { *self == DayPeriod::Night }
|
|
|
|
pub fn is_light(&self) -> bool { !self.is_dark() }
|
|
}
|