Problem with director.pushScene

18 views
Skip to first unread message

Carolina ospina

unread,
Jun 12, 2015, 3:08:36 PM6/12/15
to fla...@googlegroups.com
Hello, I have:

In my GameContext:

public function showPromptBet (round: Int) {
        director.pushScene(PromptBetScene.create(this, round));
    }

In my Scene PromptBetScene:

public static function create (ctx :GameContext, round :Int) :Entity
    {
    System.init();
PromptBetScene.ctx = ctx;
scene = new Entity();
scene.add(new Scene(false));
var background = new Entity().add(new ImageSprite(ctx.pack.getTexture("sceneGame/bgscore")));
               scene.addChild(background);
              return scene;
}

The problem is that the scene PromptBetScene is not visible. I don't find the reason, this happened with the last update. with the latest update.

Thanks.

Mark Knol

unread,
Jun 14, 2015, 2:04:25 PM6/14/15
to fla...@googlegroups.com
I dont think you need to do System.init() inside your create function.

Do you have runtime errors?

carolin...@bwstudios.co

unread,
Jun 16, 2015, 8:45:44 AM6/16/15
to fla...@googlegroups.com
Hello, no compilation errors or runtime.
Reply all
Reply to author
Forward
0 new messages