Jump to content

pugliese

Members
  • Content Count

    4
  • Joined

  • Last visited

About pugliese

  • Rank
    Newbie

Contact Methods

  • Twitter
    chris_pugliese
  1. I am loading the down below json textures, is there a way to get the texture name afterwards? var gameArt; var sprite = new PIXI.Sprite(gameArt['bee']); Is there a way to get 'bee'? (from json file) I was hoping for sprite.texture.name or something, but can't find anything PIXI.loader .add('/images/gameart.json') .load(function(){ gameArt = PIXI.loader.resources['/images/gameart.json'].textures; startGame(); }); gameart.json content: {"frames": { "bee": { "frame": {"x":85,
  2. I was using 8 as tile size, and every tile was a multiple of it, apparently that doesn't work though. Anyway, I fixed it by keeping all tiles with the same size. (odd)
  3. Hello, I am new to Phaser and I am testing tilemaps. Any idea why my tilemap loads messed up? - Specially the 32px padding on top, how do I set it to be on x:0, y:0 of the game? code: game = new Phaser.Game(800, 640, Phaser.AUTO, '', { preload: preload, create: create, update: update });game.load.tilemap('map', '/images/game/test.json', null, Phaser.Tilemap.TILED_JSON);game.load.image('tarmac', '/images/game/tarmac.png');game.load.image('192x192', '/images/game/192x192.png');game.physics.startSystem(Phaser.Physics.ARCADE);game.stage.backgroundColor = '#616161';game.map = game.add.tilemap('
  4. Is there a way to convert window.clientX / window.clientY to PIXI stage? I have this scenario: container.touchmove = container.mousemove = function(data){ currentPlayer.drawTo(data.getLocalPosition(container).x, data.getLocalPosition(container).y);}but I need to listen and input mouse coords from the whole window, as when the user is dragging outside the stage, it stops drawing. this is what I need: $(window).on('mousemove', function(ev){ var point = windowPointToPIXI ???? getLocalPosition(container); where point.x and point.y would be the same as the one from previous: data
×
×
  • Create New...