Jump to content

tonyedwardspz

Members
  • Content Count

    3
  • Joined

  • Last visited

About tonyedwardspz

  • Rank
    Newbie

Contact Methods

  • Twitter
    tonyedwardspz
  1. I'm creating a simple platform game with the phaser framework. I've added to background images as tileSprites to provide a parallax background. They are both showing in game and parallaxing as expected, however they are over sized, roughly double the height I expect. - Sprite asset size - 2048 x 1024 - Game world size - 2400 x 1024 **Adding the tileSprite** preload: function () { this.load.image('far-background', 'assets/far-background.png'); this.load.image('near-background', 'assets/near-background.png'); }, create: function () { this.farBackground = this.add.
  2. Thanks for the quick reply. It is being called multiple times. However, Instead of getting stuck, the sprite keeps on moving past it. I've also noticed that the reverseWalking function is also being called when the player walks through the tile.
  3. I have created a small platform game to try out phaser. I'm having trouble with reversing a sprite when colliding with a specific tile. I have created the map with Tiled and place specific tiles to create an enemy patrol zone. When an enemy (from a group) collides with the tile it should turn around and go in the opposite direction. I'm using the code below. Within the game.create I'm using setTileIndexCallback to trigger the below function. create: function () { // other code here map = this.add.tilemap('level1'); map.addTilesetImage('terrain', 'Tileset'); hogs = this.game.add
×
×
  • Create New...