You are on page 1of 1

define(['phaser', 'config'], function(Phaser, Config) {

'use strict';
function Behavior(game) {
this.game = game;
this.parameters = {};
}
Behavior.prototype.constructor = Behavior;
Behavior.prototype.start = function() {
this.state = 'Running';
}
Behavior.prototype.act = function() {
}
Behavior.prototype.reset = function() {
}
Behavior.prototype.succeed = function() {
this.state = 'Success';
}
Behavior.prototype.fail = function() {
this.state = 'Failure';
}
Behavior.prototype.isSuccess = function() {
return this.state === 'Success';
}
Behavior.prototype.isFailure = function() {
return this.states === 'Failure';
}
Behavior.prototype.isRunning = function() {
return this.states === 'Running';
}
Behavior.prototype.getState = function() {
return this.state;
}
return Behavior;
});

You might also like