OSDN Git Service

グローバル・デバッグモードを追加。collisionCanvasの表示を強化。デバッグモードをオンにすると見えるようになる。
[h58pcdgame/GameScriptCoreLibrary.git] / www / corelib / classes / HiddenBlockClass.js
index d2f73e2..fdc746c 100644 (file)
@@ -25,10 +25,18 @@ var HiddenBlockClass = function(ownerStage, args)
                                //下から当たっていたら画像を表示させて、さらにこの関数をベースクラスのものに戻す。
                                this.image = this.image0;
                                this.judgeCollideRange = BlockClass.prototype.judgeCollideRange;
+                               this.debugDraw = BlockClass.prototype.debugDraw;
                        }
                } else{
                        this.phantomFlag = false;
                }
                return retv;
-       }
+       },
+       debugDraw: function(x, y){
+               //衝突マップに描画
+               this.ownerStage.collisionMapContext.save();
+               this.ownerStage.collisionMapContext.strokeStyle='rgba(0, 255, 0, 0.5)';
+               strokeRect(this.ownerStage.collisionMapContext, x, y, this.size.x, this.size.y);
+               this.ownerStage.collisionMapContext.restore();
+       },
 });
\ No newline at end of file