Files
GDevelop/GDJS/Runtime/variable.js
T
Florian cb375aaac3 Moved events related functions to gdjs.evtTools.
Updated a bit the doc.

git-svn-id: svn://localhost@1058 8062f311-0dae-4547-b526-b8ab9ac864a5
2013-06-20 18:26:04 +00:00

38 lines
711 B
JavaScript

/**
* Game Develop JS Platform
* 2013 Florian Rival (Florian.Rival@gmail.com)
*/
/**
* variable is an object storing a number or a string
* @namespace gdjs
* @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;
}