Giter VIP home page Giter VIP logo

ccstate-machine's Introduction

用法

  • 导入state-machine
  • 安装staruml 5.0
  • 新建uml文件,初始状态名称必须为 none,测试工程 https://gitee.com/scober/ccstate-machine TestState ccTest
  • 点击ccstate-machine 生成文件
  • 拖入生成脚本到编辑器
  • 使用
cc.Class({
    extends: cc.Component,

    properties: {
        TestStateNode: cc.Node
    },

    onLoad() {
        let TestStateComp = this.TestStateNode.getComponent("TestState");
        TestStateComp.bindTargetActions(this);

        this.teststatefsm = TestStateComp.fsm;
    },

    // 第一步
    onEnterStep1(fsm, name, from, to, args) {
       //fsm.to_step2(); //第二步
    },

    // 第二步
    onEnterStep2(fsm, name, from, to, args) {
    },

});

ccstate-machine's People

Contributors

stevencoober avatar

Stargazers

saury avatar wotou avatar  avatar

Forkers

ph1112

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.