veloren/common/src/time.rs
Joshua Barretto 0c0f150140 fmt
2020-09-04 11:48:57 +01:00

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() }
}