Inspiaaa / UnityHFSM

A simple yet powerful class-based hierarchical finite state machine for Unity
MIT License
1.05k stars 121 forks source link

Add OnActiveStateChanged event and unit tests. #23

Closed santutu closed 4 months ago

santutu commented 1 year ago

Usecase easily track ActiveState changing.

Simple Usage fsm.OnActiveStateChanged += (state)=> Debug.Log(state.name);

I didn't add invoking event method in ActiveState's setter for minimum code changing. I added it in StateMachine class's ChangeState method and OnExit method. but i am willing to fix it.