Crates.io | pushdown-automaton-macro |
lib.rs | pushdown-automaton-macro |
version | 0.1.0 |
source | src |
created_at | 2017-09-23 10:27:51.598868 |
updated_at | 2017-09-23 10:27:51.598868 |
description | Macro generator for state machine, implementing pushdown automaton |
homepage | |
repository | https://github.com/dpogretskiy/state_machine |
max_upload_size | |
id | 32758 |
size | 9,842 |
amethyst.rs state machine generator macro.
Made exactly for abstracting over update/handle_events
method parameters.
state_machine!(StateMachine; State; _world: &mut World, _something: &mut f64);
Will generate StateMachine struct and trait for using with State trait implementations all methods of which should take &mut World
and &mut f64
as parameters.
Or something like this:
state_machine!( PlayerStateMachine; PlayerState; _mv: &mut MovingObject, _bb: &mut HasAABB, _anim: &mut HasAnimationSequence, _rend: &mut Renderable, _dir: &Directional, _pi: &PlayerInput, _delta: &DeltaTime );