Jump to content

Texture not showing untill refresh


przemoo83
 Share

Recommended Posts

I have this character made out of texture data:

 create: function () {        this.game.physics.startSystem(Phaser.Physics.ARCADE);        this.game.physics.arcade.gravity.y = 200;                var playerData = [        '...00...',            '...00...',        '..0000..',        '0..00..0',        '...00...',        '...00...',        '...00...',        '...00...',        ];    this.game.create.texture('block', playerData,4,4,0);    player = this.game.add.sprite(300, 300, 'block');    player.anchor.set(0.5);    this.game.physics.arcade.enable(player);          },

The problem is it never shows the first time I open the game. After refersh everything works fine but never the first time. Anyone knows the reason?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...