Add state methods and events to hero type
-
hero:start_state(state) starts the specified custom state on the hero -
hero:get_state() still returns a string for compatibility: "custom" -
hero:get_custom_state() returns the Lua state object -
hero:on_state_changing(state)