function game(canvas,fsec,isDebugMode){

this.canvas = canvas;

this.ctx = this.canvas.get(0).getContext("2d");

this.width = this.canvas.width();

this.height = this.canvas.height();

this.layerPool = [];

this.debugMode = isDebugMode;

this.fsec = (fsec > 0) ? fsec : 16;

this.inputs = [];

this.resource = [];

this.stage = new function stage(){

this.width = 250+Math.floor(Math.random()*50);

this.height = 250+Math.floor(Math.random()*50);

this.floorLevel = 1;

this.mapArray = [];

};

this.stage.prototype.RandomMap = function(){

if (localStorage.getItem("floor"+this.floorLevel) == null || undefined) {

for (var i = 0; i < this.mapArray.length; i++) {

this.mapArray

};

}

else{

this.mapArray = localStorage.getItem("floor"+this.floorLevel);

}

}

}

/*resource Manager*/

game.prototype.loadObjToFile = function(path) {

$.getJSON(path,function(json) {

/*optional stuff to do after success */

for (var i = 0; i < json.length; i++) {

var imgElement =  document.createElement('img');

imgElement.src = json[i].path;

imgElement.>

self.Game.resource.push({name:json[i-1].name,imageData:this});

}

};

});

}



원래 시바 js에서 함수객체 안에 함수겍체 새로만들고 포로토타입꼬라박고 이런 변태 플래이가 가능함?? 아님 다른이유인거임?