Commit Graph

13 Commits

Author SHA1 Message Date
Bill Hilbert
01e871c415 state_machine: prev_state_name 2023-12-12 22:22:13 -05:00
David Briscoe
8d41c6d3d1 lint: Fix whitespace issues
Remove excess whitespace and remove related ignores.
2022-03-03 10:17:34 -08:00
Max Cahill
3cc177a0c0 BREAKING class interface refactor - all classes will need a minor update, see class.lua
tl;dr is that new no longer needs to call init, calling :new() directly in user code is not allowed, properties are copied, metamethods work, and a config table is needed rather than a class to extend from, so use {extends = superclass} if you want a minimal fix
2021-07-15 16:15:27 +10:00
Max Cahill
b44b92a32d refactored state machine to be clear about which variables and parameters are state tables, and which are name strings
breaking - changed some property and function names

fixes #16
2021-07-05 14:53:55 +10:00
pakeke-constructor
f4a924aced
Fixed start state inclusion in state_machine 2021-01-25 12:22:37 +13:00
Max Cahill
70d6a99891 [modified] state machine api; no longer gets the machine on all callbacks.
benefit is being able to use a plain old class with `:update(dt)` as a state, and therefore nest state machines directly without a wrapper.
2020-12-01 15:33:22 +11:00
speak
af60cf26cf
Mention varargs being passed into state callbacks 2020-11-30 23:04:19 +02:00
Max Cahill
e9313f61e0 [added] reset state upon re-entering state machine as_state 2020-06-11 15:35:57 +10:00
Max Cahill
01713f766f [modified] minor semantics of state machines, added machinery to allow them to be nested more easily, added notes 2020-06-02 15:02:20 +10:00
Max Cahill
27790c69a8 [added] state_machine:_call supports varargs 2020-04-07 13:56:00 +10:00
Max Cahill
1e07dd9746 [modified] state machine uses class rather than own metatable management 2020-04-07 13:53:28 +10:00
Max Cahill
ad2fc71e7a [fixed] non-global compatible 2020-03-15 21:22:22 +11:00
Max Cahill
2f470cf7c7 initial commit 2020-01-29 14:26:28 +11:00