[−][src]Trait myelin_engine::object::ObjectBehavior
Behavior of an object
Required methods
fn step(
&mut self,
own_description: &ObjectDescription,
world_interactor: &dyn WorldInteractor
) -> Option<Action>
&mut self,
own_description: &ObjectDescription,
world_interactor: &dyn WorldInteractor
) -> Option<Action>
Returns all actions performed by the object in the current simulation tick
fn as_any(&self) -> &dyn Any
Cast implementation to Any
.
This is needed in order to downcast trait objects of type &dyn ObjectBehavior
to
concrete types.
Implement this as follows.
ⓘThis example is not tested
fn as_any(&self) -> &Any { self }