Exemplo n.º 1
0
var GeneJS = require('GeneJS');

// Transition 转变
var SceneTransition = GeneJS.Class({

});


exports.SceneTransition = SceneTransition;
Exemplo n.º 2
0
var GeneJS = require('GeneJS');

var SceneState = require('./SceneState.js').SceneState;
var SceneAction = require('./SceneAction.js').SceneAction;
var SceneTransition = require('./SceneTransition.js').SceneTransition;

var SceneFsm = GeneJS.Class({
    'public createFsm': function() {
        var fsm = {
            // 开始状态
            "@initial": SceneState.$('GAME_MEDIATOR'),
            "state": [
                {
                    // Game
                    "@name": SceneState.$('GAME_MEDIATOR'),
                    //"@changed": SceneTransition ,
                    "transition": [
                        {
                            "@action": SceneAction.$('GAME_Result_ACTION'),
                            "@target": SceneState.$('GAME_Result_MEDIATOR')
                        }
                    ]
                }
            ]
        };

        return fsm;
    }
});

exports.SceneFsm = SceneFsm;