pub struct WeatherSystem {Show 13 fields
pub current: WeatherType,
pub target: WeatherType,
pub blend: f32,
pub transition_speed: f32,
pub cloud_coverage: f32,
pub precipitation: f32,
pub wind_speed: f32,
pub wind_dir: Vec2,
pub visibility: f32,
pub temperature: f32,
pub humidity: f32,
pub lightning_chance: f32,
pub thunder_delay: f32,
/* private fields */
}Expand description
Weather system with transition and effects.
Fields§
§current: WeatherType§target: WeatherType§blend: f32§transition_speed: f32§cloud_coverage: f32§precipitation: f32§wind_speed: f32§wind_dir: Vec2§visibility: f32§temperature: f32§humidity: f32§lightning_chance: f32§thunder_delay: f32Implementations§
Source§impl WeatherSystem
impl WeatherSystem
pub fn new() -> Self
pub fn transition_to(&mut self, weather: WeatherType, speed: f32)
pub fn tick(&mut self, dt: f32)
pub fn is_raining(&self) -> bool
pub fn is_snowing(&self) -> bool
pub fn push_forecast(&mut self, weather: WeatherType, duration_secs: f32)
pub fn advance_forecast(&mut self)
Trait Implementations§
Source§impl Clone for WeatherSystem
impl Clone for WeatherSystem
Source§fn clone(&self) -> WeatherSystem
fn clone(&self) -> WeatherSystem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WeatherSystem
impl Debug for WeatherSystem
Auto Trait Implementations§
impl Freeze for WeatherSystem
impl RefUnwindSafe for WeatherSystem
impl Send for WeatherSystem
impl Sync for WeatherSystem
impl Unpin for WeatherSystem
impl UnsafeUnpin for WeatherSystem
impl UnwindSafe for WeatherSystem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more