• Content Count

  • Joined

  • Last visited

  1. Hi, You don't need to call game.add.existing(this) for your child sprite, the position of the child is always relative to the parent sprite position and when the parent sprite moves, the child moves too automatically.
  2. Hello, You can just check the pointer position before doing your work in the callback function. you can get the pointer position with game.input.x & game.input.y
  3. Hello, Thanks for making this awesome plugin ! Is there any map editor so we can create levels easily ? Edit: it looks like it's not compatible with phaser V2.3, im gettting some errors when using with 2.3
  4. Hello, I Still have a problem, I tested out of CocoonJS launcher, seems like the game scalled up, but not the the sprites, they are minified on the top left of the screen, also the tilemap is dont displayed. Do you have a little demo, juste for showing a real example which I / we can test on device. I think most people have problem with CocoonJS scaling
  5. Hello, I have a question, if we want to create a group, of sprites other that the world group, how do we do? We can put a group in an other group? I dont understand your safe zone numbers, can you explain why 2048x1365 ? Thanks
  6. Hi, if you are using phaser 1.1.3 you can do this var layerOne = game.add.tilemapLayer(0, 0, 800, 600, tileset, map, 0); layerOne.resizeWorld();var layerTwo = game.add.tilemapLayer(0, 0, 800, 600, tileset, map, 1); layerTwo.resizeWorld();var layerThree = game.add.tilemapLayer(0, 0, 800, 600, tileset, map, 2); layerThree.resizeWorld();The last parameter of tilemapLayer is the layer number, so you create 3 layers with differents layer number. But on Phaser 1.1.4 is not the same things.
  7. Hi, Im using Json file generated by Tiled, it work anywhere except with cocoonjs, Unfortunately, seems like nobody cares
  8. Hi, you can read this, i think it's what you are looking for : http://www.html5gamedevs.com/topic/2273-phaser-cocoonjs-vs-webgl-scaling-finally-solved/
  9. Ryuuke

    Paused Game

    Ok, thx, problem solved, I used jquery to display menu and then I can pause the game & click on menu, I think it's a good solution
  10. Ryuuke

    Paused Game

    Hello, I want to create a pause menu that when the user click in a button, the pause menu apear and the game is paused. I havesome trouble with that, when the user click the first time the game is paused, but the second time, nothing change, because the game is paused, so how can I do that? this.PauseButton = this.game.add.button(10, 10, "spritesheet", () => { this.game.paused = !this.game.paused; }, this, "pause-button1.png", "pause-button2.png", "pause-button3.png");
  11. Its maybe the new version of cocoonJS, no one have this problem?
  12. Not working for me on CocoonJS, but working fine On webView & apache cordova. this is the code : this.Map = this.game.add.tilemap(argRule.Map.MapName); this.Map.addTilesetImage(argRule.Map.TileSetName, argRule.Map.TileImageName); var firstLayer = this.Map.createLayer("background"); firstLayer.resizeWorld(); var secondLayer = this.Map.createLayer("bg-house"); secondLayer.resizeWorld(); var thirdLayer = this.Map.createLayer("tiles"); thirdLayer.resizeWorld();
  13. Hi, I notice there's a problem with the tile maps on cocoonjs, the map is black, someone has already tested? ps : Tested with phaser 1.1.3 and 1.1.4
  14. Hi, I tried these two codes On iphone, and samsung galaxy S, the result is the same, and the game has not been resized. this is part of my Boot class create() { this.stage.scale.pageAlignHorizontally = true; this.input.maxPointers = 1; this.stage.disableVisibilityChange = true; if (!this.game.device.desktop) { this.game.stage.scale.startFullScreen(); this.game.stage.scaleMode = Phaser.StageScaleMode.SHOW_ALL; this.game.stage.scale.minWidth = 480; this.game.stage.scale.minHeight = 260; this.game.stage.scale.maxWidth = 1024; this.game.stage.scale.maxHeight = 768; this.game.stage.scale.forceLandscape = true; this.game.stage.scale.setScreenSize(true); this.game.stage.scale.setShowAll(); this.game.stage.scale.refresh(); } this.game.state.start("Preloader"); }and create() { this.stage.scale.pageAlignHorizontally = true; this.input.maxPointers = 1; this.stage.disableVisibilityChange = true; if (!this.game.device.desktop) { } this.game.state.start("Preloader"); }I started the game with 480 320, this take a full screen on iphone, but 1/3 of the screen of samsung EDIT 1: seems like cocoon js problem, it's strange, i tried it with cordova and it works like a charm, but i can't use it for game. Do you know any other platform for build mobile html5 games?