Port Paths to AS from java. Also, port (with modifications) AStarPathUtil -> AStarPathSearch which is no longer a singleton and has fewer hidden dependencies (e.g. the restriction on the "longest" arg to getPath). Also, make MisoScenePanel actually create paths now that we have them.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@982 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Mike Thomas
2010-08-13 20:28:48 +00:00
parent d8cda89ab3
commit 3b0b6038dc
13 changed files with 1213 additions and 23 deletions
@@ -157,6 +157,7 @@ public class CharacterSprite extends Sprite
public function setOrientation (orient :int) :void
{
var oorient :int = _orient;
_orient = orient;
if (orient < 0 || orient >= DirectionCodes.FINE_DIRECTION_COUNT) {
log.info("Refusing to set invalid orientation [sprite=" + this +
@@ -164,12 +165,16 @@ public class CharacterSprite extends Sprite
return;
}
var oorient :int = _orient;
if (_orient != oorient) {
updateMainSprite();
}
}
public function getOrientation () :int
{
return _orient;
}
public function cancelMove () :void
{
halt();
@@ -181,7 +186,7 @@ public class CharacterSprite extends Sprite
setActionSequence(getFollowingPathAction());
}
public function pathCompleted () :void
public function pathCompleted (timestamp :int) :void
{
halt();
}
@@ -231,6 +236,7 @@ public class CharacterSprite extends Sprite
if (_aframes != null) {
_aframes.getFrames(_orient, function(frames :MultiFrameBitmap) :void {
_framesBitmap = frames;
DisplayUtil.removeAllChildren(_mainSprite);
_mainSprite.addChild(frames);
});
} else {