Skip to content

Using Game dimensions in a model definition within a scene is not correct when greater than 640 x 480. #4

@burtlo

Description

@burtlo

When a developer uses the Game.dimensions or Game.center within a scene to populate a model property it is actually set to the default value of 640 x 480 and not to the actual value of the game.

class FirstScene < GameScene
  draw :hero, position: Game.center
en

In this example the hero will be drawn at 320 x 240.

This is likely because of these class methods being interpreted before the metro game file has been properly calculated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions