SHARE
TWEET
Untitled
a guest
Sep 26th, 2018
81
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- type StateMachine interface {
- void Enter();
- void Update();
- void Exit();
- }
- type DefaultStateMachine struct {}
- void (dsm *DefaultStateMachine) Enter() {}
- void (dsm *DefaultStateMachine) Update() {}
- void (dsm *DefaultStateMachine) Exit() {}
- ... (meanwhile in another package) ...
- type UserStateMachine struct {
- gofsm.DefaultStateMachine
- }
- void (usm *UserStateMachine) Update() {
- // User code here, adheres to the interface without forcing methods, etc.
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
