mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-21 21:54:35 +00:00
rollback state_machine commit
This commit is contained in:
parent
01e871c415
commit
ce0205b42a
@ -33,7 +33,6 @@ local state_machine = class({
|
||||
function state_machine:new(states, start_in_state)
|
||||
self.states = states or {}
|
||||
self.current_state_name = ""
|
||||
self.prev_state_name = ""
|
||||
self.reset_state_name = start_in_state or ""
|
||||
self:reset()
|
||||
end
|
||||
@ -152,7 +151,6 @@ end
|
||||
function state_machine:set_state(name, reset)
|
||||
if self.current_state_name ~= name or reset then
|
||||
self:_call("exit")
|
||||
self.prev_state_name = self.current_state_name
|
||||
self.current_state_name = name
|
||||
self:_call_and_transition("enter", self)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user