Struct Data

Source
pub struct Data { /* private fields */ }

Implementations§

Source§

impl Data

Source

pub fn new() -> Data

Source

pub fn set_level(&mut self, level: Level)

Source

pub fn check_position(&self, position: Rectangle) -> Option<&Entity>

Returns &Entity if at position, else returns none

Source

pub fn check_position_player(&self, position: Rectangle) -> Option<&Entity>

Source

pub fn check_position_both(&self, position: Rectangle) -> Option<&Entity>

Source

pub fn set_player(&mut self, player: Entity)

Source

pub fn get_player(&self) -> &Entity

Source

pub fn get_mut_player(&mut self) -> &mut Entity

Source

pub fn get_settings(&self) -> &Settings

Source

pub fn add_entity(&mut self, entity: Entity)

Source

pub fn entities_act(&mut self)

Source

pub fn get_entities(&self) -> &Vec<Entity>

Source

pub fn change_entities(&mut self, entities: Vec<Entity>)

Source

pub fn get_mut_entities(&mut self) -> &mut Vec<Entity>

Source

pub fn add_one_time(&mut self)

Source

pub fn get_time(&self) -> u32

Source

pub fn get_level(&self) -> &Level

Source

pub fn get_randomness(&self) -> f32

Source

pub fn get_randomness_with(&self, number: i32) -> f32

Auto Trait Implementations§

§

impl Freeze for Data

§

impl RefUnwindSafe for Data

§

impl Send for Data

§

impl Sync for Data

§

impl Unpin for Data

§

impl UnwindSafe for Data

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.