Comments (4)
Hi Ryan,
It's good to hear you're using StateMachines. Your feedback is appreciated.
Could you please show me the code you used to create de State Machines, so I can take a look and fix any other possible bugs?
from state-machine.
Sure, here is an example:
var zombieSM:StateMachine = new StateMachine();
zombieSM.addState("birthing",{ enter: onBirthingEnter});
zombieSM.addState("normal",{ enter: onNormalEnter, from:"birthing,food_normal_transition"});
zombieSM.addState("food_seeking",{ enter: onFoodSeekingEnter, from:"normal"});
zombieSM.addState("food_normal_transition",{ enter: onFoodToNormalTransitionEnter, from:"food_seeking"});
zombieSM.addState("dead",{ enter: onDeadEnter, from:"normal,food_seeking,food_normal_transition"});
zombieSM.initialState = 'birthing';
I am now starting to use this class all over my app, it's helping me keep things organized and think more clearly. I have still barely scratched the surface of this class, I am now looking into the transition stuff and the hierarchical ability.
from state-machine.
Anything new for you?
from state-machine.
Check out the live game at http://apps.facebook.com/zombie_pets/
from state-machine.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from state-machine.