[][src]Trait evolution::Entity

pub trait Entity {
    fn pos(&self) -> Point2<f32>;
fn radius(&self) -> f32; }

Used by the Generic Function Fish.consume() to represent a piece of food or a fish

Required methods

fn pos(&self) -> Point2<f32>

Returns the currently location of the entity

fn radius(&self) -> f32

Returns the radius of the entity

Loading content...

Implementors

impl Entity for Fish[src]

fn pos(&self) -> Point2<f32>[src]

Returns a reference to the fish's position

fn radius(&self) -> f32[src]

Returns the radius around the center of the fish at which it can interact with other entities

impl Entity for Food[src]

fn pos(&self) -> Point2<f32>[src]

Returns a reference to the piece of food's position

fn radius(&self) -> f32[src]

Returns the radius of the piece of food

Loading content...