google-code-export / pushbuttonengine

Automatically exported from code.google.com/p/pushbuttonengine
0 stars 0 forks source link

Renderer added to stage renders in center then blinks to proper sceneAlignment #153

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
Assigning to boushley.

Original comment by zaal...@gmail.com on 16 Jul 2010 at 8:23

GoogleCodeExporter commented 9 years ago
Resolved in revision 1040 and in revision 1041.

Original comment by boush...@gmail.com on 17 Jul 2010 at 7:24