Jump to content

m4uro

Members
  • Content Count

    8
  • Joined

  • Last visited

About m4uro

  • Rank
    Newbie

Contact Methods

  • Twitter
    maurom16

Recent Profile Visitors

781 profile views
  1. m4uro

    Sorting groups

    Can someone please post the workaround for this problem? I'm really stuck with it :/ . Thanks!
  2. To flip the sprites, reverse the sign of the scale property: sprite.scale.x *= -1; //flip horizontally sprite.scale.y *= -1; //flip vertically Remember to set the anchor properly, generally: sprite.anchor.setTo(0.5, 0.5); //so the texture of the sprite is centered
  3. I have two groups of sprites, one containing trees, and another one containing characters. I want to sort them with the group.sort() function, but in order to do that I would need to put them in other, bigger group. However, I can't do that with the approach taken in the example of "sub groups", because when I do it that way, the _container has other containers as its children, instead of the actual sprites. What is the best/easiest way to accomplish this, without losing the flexibility of having separate groups for trees and characters?
  4. Yes, I didn't want to do that because it would export all the frames as a single animation, with the same name, but fixing that should be easier than the alternatives. Thanks rich!
  5. I still think that there is some kind of confusion with the issue I'm having, but I really appreciate the effort you are doing in trying to understand me rich!! (Thanks! ) I'll quote something the flash user said in a later post of the link i posted before, with the hope of making myself clear:
  6. Yeah, the problem could definitely be solved if I were able to export all the frames with an identical size. I am by no means a flash expert, and I learned to make and export animations that way, however I guess that is the correct way, because the other option would imply wasted space in the spritesheet, just to fill the empty space of a "transparent" background that matches the biggest height and width of all of the animation frames. Anyway, If this kind of problem is not familiar to you, maybe I should try to solve it in the context of flash, as you say, instead of in the context of phaser.
  7. The atlas currently has 3 animations, and each have between 15 and 30 frames. But I don't think the problem is related to the sprite sheet size. Maybe my problem can be best understood in this link posted by another person, he seemed to be having the exact same issue: http://forums.adobe.com/thread/1230558 The workaround I'm trying would be basically something like: //when changing animations: sprite.y = //reset offset sprite.x = //reset offset sprite.animations.play('idle', null, true);sprite.y += offsetY('idle'); //where offsetY returns the y offset for a given animation sprite.x += offsetX(
  8. Hi, I've run into some trouble while trying to align some animations of a character. I made the character in Adobe flash CS6 and used its new tool to generate a spritesheet + atlas json file of several animations of the same character (walk, attack, idle, etc). Each animation is correctly animated and displayed individually, however, when I switch in-between them, I find they are not aligned, that is, there is no common reference point between the animations, so when I switch from, let's say, idle to attack, the character seems to "move" to another position. I managed to modify the plugin used
×
×
  • Create New...