Jump to content

jjppof

Members
  • Content Count

    6
  • Joined

  • Last visited

About jjppof

  • Rank
    Newbie
  • Birthday August 21

Contact Methods

  • Website URL
    https://github.com/jjppof

Profile Information

  • Gender
    Male
  • Location
    MG/Brazil
  1. Is there a way to set a different frameRate for each frame of an animation? I could not find anything in the documentation. I'm using phaser 2.
  2. I think we can close this topic, because the real problem that is happening is other thing as I described here. I thought that was a Z index problem, because I was imagining that the fade out problem I'm having was due to a possible desorder letting the black plane in the lowest layer not causing the fade out effect.
  3. I have a function (fire_event()) outside update(). Inside this function, I do these things: function fire_event(){ my_flag = false; do_stuff_1(); game.add.tween(sprite).to( { alpha: 1.0 }, Phaser.Timer.HALF, Phaser.Easing.Linear.None, true).onComplete.addOnce(function(){ game.time.events.add(Phaser.Timer.HALF, function(){ do_stuff_2(); game.add.tween(sprite).to( { alpha: 0.0 }, Phaser.Timer.HALF, Phaser.Easing.Linear.None, true).onComplete.addOnce(function(){ my_flag = true; }, this); }, this); }, this); }
  4. transtions_group = game.add.group(); black_rect = game.add.graphics(0, 0); black_rect.lineStyle(0); black_rect.beginFill(0x0, 1); black_rect.drawRect(0, 0, width, height); black_rect.endFill(); transtions_group.addChild(black_rect);
  5. Changed the code, but nothing changed. The z index of the groups are right. But z index of their children is wrong. A child of z index = 7 inside overlayer_group is on top of a child of z index = 4 inside transition_group, even if overlayer_group has z index = 3 and transition_group has z index = 4.
  6. I created these four groups: underlayer_group = game.add.group(); npc_group = game.add.group(); overlayer_group = game.add.group(); transtions_group = game.add.group(); I set these depth factor to help me sorting them: underlayer_group.depth = 1; npc_group.depth = 2; overlayer_group.depth = 3; transtions_group.depth = 4; The problem is: In some moments of the game, I use removeAll() method from the groups underlayer_group and overlayer_group to remove their children, so I can add new children. Here is how I add them: this.map_sprite = game.add.tilemap(this.key_name)
×
×
  • Create New...