OSDN Git Service

Merge commit 'dfdd077a64951d38c565b992511279e575ed49a6'
[h58pcdgame/GameScriptCoreLibrary.git] / www / corelib / classes / BlockClass.js
index c42b690..44c2a7f 100644 (file)
@@ -1,13 +1,14 @@
-var BlockClass = function(ownerStage, image)
+var BlockClass = function(ownerStage, args)
 {
-       BlockClass.base.apply(this, [ownerStage]);
+       //args[imgName]
+       BlockClass.base.apply(this, arguments);
        var img = document.createElement('img');
-       img.src = "images/" + image;
+       img.src = "images/" + args[0];
        this.image = img;
        
 }.extend(StageObject, {
        draw: function(x, y){
-               this.stage.mainContext.drawImage(this.image, x, y, 32, 32);
+               this.ownerStage.mainContext.drawImage(this.image, x, y, 32, 32);
        },
        
        //\83u\83\8d\83b\83N\82Ì\93\96\82½\82è\94»\92è\97Ì\88æ\82ð\95Ï\8dX\82·\82é\82½\82ß\82É\82Í\82±\82Ì\8aÖ\90\94\82ð\83I\81[\83o\81[\83\89\83C\83h\82·\82é