From: Koichi KAMICHI Date: Tue, 31 Jan 2006 07:38:23 +0000 (+0000) Subject: Fixed var names. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=22effc184fba0b4df713bacaeaec94f14fd2e169;p=chise%2Fkage.git Fixed var names. --- diff --git a/engine/polygon.js b/engine/polygon.js index b64edc7..32667db 100755 --- a/engine/polygon.js +++ b/engine/polygon.js @@ -1,16 +1,16 @@ -function Polygon(_index){ +function Polygon(number){ // method - function push(_x, _y){ // void + function push(x, y){ // void var temp = new Object(); - temp.x = _x; - temp.y = _y; + temp.x = x; + temp.y = y; this.array.push(temp); } Polygon.prototype.push = push; - function set(_index, _x, _y){ // void - this.array[_index].x = _x; - this.array[_index].y = _y; + function set(index, x, y){ // void + this.array[index].x = x; + this.array[index].y = y; } Polygon.prototype.set = set; @@ -19,8 +19,8 @@ function Polygon(_index){ } Polygon.prototype.reverse = reverse; - function concat(_poly){ // void - this.array = this.array.concat(_poly.array); + function concat(poly){ // void + this.array = this.array.concat(poly.array); } Polygon.prototype.concat = concat; @@ -28,8 +28,8 @@ function Polygon(_index){ this.array = new Array(); // initialize - if(_index){ - for(var i = 0; i < _index; i++){ + if(number){ + for(var i = 0; i < number; i++){ this.push(0, 0); } } diff --git a/engine/polygons.js b/engine/polygons.js index ae53bc0..9f26955 100755 --- a/engine/polygons.js +++ b/engine/polygons.js @@ -1,7 +1,7 @@ function Polygons(){ // method - function push(_polygon){ // void - this.array.push(_polygon); + function push(polygon){ // void + this.array.push(polygon); } Polygons.prototype.push = push;