Files
GDevelop/GDJS/Runtime/variable.js
T
Florian ad2f3d45f4 Added MathematicalToolsExtension.
Added call to StripUnimplementedInstructionsAndExpressions to not fully implemented extensions.
Improved ShootJS.gdg
Added Collisions benchmark.gdg : 7/8 fps with Chrome 27 on my computer.

git-svn-id: svn://localhost@1030 8062f311-0dae-4547-b526-b8ab9ac864a5
2013-06-13 10:42:19 +00:00

33 lines
606 B
JavaScript

/**
* variable is an object storing a number or a string
* @class variable
*/
gdjs.variable = function(value)
{
var that = {};
var my = {};
my.value = value || 0;
/**
* Get the value of the variable
* @method getValue
* @return {Any} The value stored
*/
that.getValue = function() {
return my.value;
}
/**
* Change the value of the variable
* @method setValue
* @param newValue {Any} The new value to be set
*/
that.setValue = function(newValue) {
my.value = newValue;
}
return that;
}