Implemented variables properly.
This commit is contained in:
@@ -8,6 +8,11 @@ function Position(position_str = "0,0",y = null)
|
||||
this.x = y ? position_str : parseFloat(this.position_str.split(",")[0]);
|
||||
this.y = y ? y : parseFloat(this.position_str.split(",")[1]);
|
||||
|
||||
this.add = function(position)
|
||||
{
|
||||
return new Position(this.x + position.x, this.y + position.y);
|
||||
}
|
||||
|
||||
this.is_equal = function(target)
|
||||
{
|
||||
if(target.x == this.x && target.y == this.y){ return true; }
|
||||
|
||||
@@ -4,7 +4,10 @@ function Variable(key,value)
|
||||
|
||||
this.candidates = [];
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
|
||||
if(value == "true"){ this.value = true; }
|
||||
else if(value == "false"){ this.value = false; }
|
||||
else{ this.value = value; }
|
||||
|
||||
this.render = function()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user