@@ -55,23 +55,26 @@ package
55
55
if (dy < 0 )
56
56
{
57
57
jumpHeight += - dy/ 8.0 ; //frameHeight;
58
- trace (jumpHeight);
58
+ // trace(jumpHeight);
59
59
}
60
60
}
61
61
}
62
62
63
63
public function canMove (dx :Number ,dy :Number ):Boolean
64
64
{
65
+ trace ("doesn't overlap" , doesNotOverlapAt(x + dx,y + dy,state . allBlocks));
66
+ trace ("not does overlap" ,! overlapsAt(x + dx,y + dy,state . allBlocks));
65
67
//trace(y + dy <= FlxG.height - frameHeight);
66
68
// Bound the block within the frame from left and right
67
69
return x + dx >= 0
68
70
&& x + dx <= FlxG. width - frameWidth
69
71
&& y + dy <= FlxG. height - frameHeight
70
72
&& y + dy >= 0
71
- && doesNotOvelapAt(x + dx, y + dy, state . allBlocks);
73
+ && doesNotOverlapAt(x + dx, y + dy, state . allBlocks)
74
+ && doesNotOverlapAt(x + dx, y + dy + frameHeight/ 2 , state . allBlocks);
72
75
}
73
76
74
- public function doesNotOvelapAt (X :Number ,Y :Number ,group :FlxGroup ):Boolean
77
+ public function doesNotOverlapAt (X :Number ,Y :Number ,group :FlxGroup ):Boolean
75
78
{
76
79
var block: Block;
77
80
for (var i: String in group . members )
@@ -104,7 +107,7 @@ package
104
107
}
105
108
else
106
109
{
107
- trace ("steady falling" );
110
+ // trace("steady falling");
108
111
steadyFall();
109
112
}
110
113
}
0 commit comments