var fx = dx == 0, fy = dy == 0;
var ex = sx, ey = sy;
var gotItems = [];
+ var caterpillar = Math.abs(obj.caterpillar * dx);
for(var i = 0; i < ct && !(fx && fy); i++)
{
//\89¼\82É\82¨\82¢\82Ä\82Ý\82é\8dÀ\95W
if(!fx && this.collideJudge(obj, ex + dx, ey, gotItems))
{
- if(this.collideJudge(obj, ex + dx, ey - 2, gotItems))
+ if(this.collideJudge(obj, ex + dx, ey - caterpillar, gotItems))
{
fx = true;
collideDirection |= (dx > 0 ? 1 : 2);
}else
{
- ey -= 2;
+ ey -= caterpillar;
}
}
this.collisionMarginLeft = 6;
this.collisionMarginRight = 6;
this.collisionMarginBottom = 2;
+
+ //\92i\8d·\82â\8dâ\82ð\8fæ\82è\89z\82¦\82ç\82ê\82é\83\8c\83x\83\8b 0\82¾\82Æ\8dâ\82ð\91S\82\8fã\82ê\82È\82¢
+ this.caterpillar = 2.5;
+
}.extend(StageObject, {
className: "MovableStageObjectClass",
tick: function(){
//width * heightの大きさのCanvasを
//(x,y,z)に生成する。
//parentには、Canvasタグを包含することになるDOMオブジェクトのidを指定する。
- canvas = document.createElement("canvas");
+ var canvas = document.createElement("canvas");
canvas.id = id;
return canvas;
}
+function createMessageBox(id, width, height, x, y, parent, color, foreColor, z)
+{
+ if(color == undefined) color = "#000";
+ if(foreColor == undefined) foreColor = "#fff";
+
+ var base = document.createElement("div");
+ with(base.style)
+ {
+ opacity = "0.7";
+ top = y + "px";
+ left = x + "px";
+ width = width + "px";
+ height = height + "px";
+ backgroundColor = color;
+ color = foreColor;
+ position = "absolute";
+ border = "1px " + foreColor + " solid";
+ overflow = "hidden";
+ fontSize = "32px";
+ }
+ base.id = id;
+
+ var p = document.createElement("div");
+ with(p.style)
+ {
+ position = "relative";
+ padding = "16px";
+ margin = "0 auto";
+ }
+ base.appendChild(p);
+
+ parent.appendChild(base);
+ return base;
+}
+
+function changeMessageBox(box, message)
+{
+
+}
+
function createDOMObject(typestr, idstr, parentidstr)
{
dobj = document.createElement(typestr);