- Home /
Question by
Lag2015 · May 19, 2015 at 10:44 AM ·
state-machinemoves
Can I make a good state machine with delegates?something like this...
delegate void State(); State state;
void Start(){ state=idle }
void Update(){ state(); }
void idle(){
if(Input...........)
state=walk; }
void walk(){.....
thats work, but, is a good way?, ¿performs well?
Comment
You could use animators... you can create state machines visually using those. http://docs.unity3d.com/$$anonymous$$anual/Animator.html