Code Monkey home page Code Monkey logo

Comments (4)

cassiozen avatar cassiozen commented on July 22, 2024

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.

ryanprice avatar ryanprice commented on July 22, 2024

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.

cassiozen avatar cassiozen commented on July 22, 2024

Anything new for you?

from state-machine.

ryanprice avatar ryanprice commented on July 22, 2024

Check out the live game at http://apps.facebook.com/zombie_pets/

from state-machine.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.