Since rendering the sprite itself isn't good enough to trigger the scene to re-render, let's directly check whether we've updated the sprites and if any have, we'll rerender the object IsoScene
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@959 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -57,8 +57,6 @@ public class CharacterIsoSprite extends IsoSprite
|
|||||||
_character = charSprite;
|
_character = charSprite;
|
||||||
|
|
||||||
sprites = [wrapper];
|
sprites = [wrapper];
|
||||||
|
|
||||||
autoUpdate = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tick (tickStamp :int) :void
|
public function tick (tickStamp :int) :void
|
||||||
|
|||||||
@@ -93,9 +93,16 @@ public class CrowdStageScenePanel extends StageScenePanel
|
|||||||
override public function tick (tickStamp :int) :void
|
override public function tick (tickStamp :int) :void
|
||||||
{
|
{
|
||||||
super.tick(tickStamp);
|
super.tick(tickStamp);
|
||||||
|
var shouldRender :Boolean = false;
|
||||||
_sprites.forEach(function (key :int, sprite :CharacterIsoSprite) :void {
|
_sprites.forEach(function (key :int, sprite :CharacterIsoSprite) :void {
|
||||||
sprite.tick(tickStamp);
|
sprite.tick(tickStamp);
|
||||||
|
shouldRender ||= sprite.isInvalidated;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// TODO - partial scene rerenders would be useful here...
|
||||||
|
if (shouldRender) {
|
||||||
|
_objScene.render();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function updateDisplayForScene () :void
|
protected function updateDisplayForScene () :void
|
||||||
|
|||||||
Reference in New Issue
Block a user