mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-24 20:05:39 -04:00
cb375aaac3
Updated a bit the doc. git-svn-id: svn://localhost@1058 8062f311-0dae-4547-b526-b8ab9ac864a5
38 lines
711 B
JavaScript
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;
|
|
}
|