package
{
import com.pblabs.engine.PBE;
import com.pblabs.engine.entity.IEntity;
import com.pblabs.rendering2D.SceneAlignment;
import com.pblabs.rendering2D.SimpleShapeRenderer;
import com.pblabs.rendering2D.ui.SceneView;
import flash.display.Sprite;
import flash.geom.Point;
public class TestSceneAlignment extends Sprite
{
public function TestSceneAlignment()
{
PBE.startup(this);
PBE.initializeScene(new SceneView());
PBE.scene.sceneAlignment = SceneAlignment.TOP_LEFT;
createHero();
}
private function createHero():void
{
var hero:IEntity = PBE.allocateEntity();
var render:SimpleShapeRenderer = new SimpleShapeRenderer();
render.scene = PBE.scene;
hero.addComponent(render, "render");
hero.initialize("hero");
}
}
}
What is the expected output? What do you see instead?
When I first load this game, the circle renders in the center then blinks to
the top left, even
though the sceneAlignment was already set correctly prior to adding the
renderer.
Original issue reported on code.google.com by zaal...@gmail.com on 21 Mar 2010 at 4:12
Original issue reported on code.google.com by
zaal...@gmail.com
on 21 Mar 2010 at 4:12