Jump to content

ashtrail

Members
  • Content Count

    7
  • Joined

  • Last visited

  1. I think so. So based on Tom Atom's example "atlasFrameName" would be "Spritor"? And that will take the specific area of the image for the sprite, or am I wrong?
  2. Hello, I've got a strange error. I've got a quitting menu in my game which basically ask you if you want to quit or not when you click on a button (that part works fine). If ever you answer "Nope" then I will destroy without any mercy all sprites that were used to buld the quit menu (that part kinda works but wait for it...). Problem is if you can't set your mind and you click that quitting button once again, and decide to say no a second time (why would you even do that I don't know but...) and at that point no sprites are destroyed (none, not even one) but the game unpause for the rest of
  3. But will that make it a Phaser.Sprite object? Cuz I want a Phaser.Sprite so I can use Sprite methods... (that's the problem in fact T_T). Is it a way to load only a part of the image and then assign it to a Sprite? Or does it create a new object called Spritor? (I don't use json yet, I'm still on the localhost phase, using real images that are in files, so I apologize for my lack of knowledge in that field)
  4. You think it's because of the "this"? I'll try it out next time I want to make a clickable rectangle. For that rectangle I found another way to do it ( http://www.html5gamedevs.com/topic/5685-clickable-area/ ). But thanks!
  5. Hi, for the project I'm doing I need to deal with imperfect spritesheet (and I can't modify them myself, my code needs to do this, and I'm using phaser and it's sprites). So I was wondering is there some kind of function that goes like that : mySuperSprite = new Phaser.Sprite(game, coord_x_in_img, coord_y_in_img, sprite_width, sprite_height, img);Where the point P(coord_x_in_img, coord_y_in_img) is the upper left corner of the sprite you want to create. With this you could for example make a sprite that's a nose, from a picture with a face on it. It would be really cool if it existed... Th
  6. Hello everyone, I'm trying to make a rectangle clickable just like a sprite. I read here and there and the hitArea way should be the best for me since the rectangle have variable size, so I can't really use an invisible sprite. That's what my code looks like but it raises the error : "Uncaught TypeError: Cannot read property 'onInputUp' of undefined". So what would be the proper way to do this (I coulnd't find doc on hitArea) : unpauseButton = game.add.graphics(0, 0);unpauseButton.beginFill(0x81DEED, 1);unpauseButton.drawRect(SIZE_X * 0.55, SIZE_Y * 0.65, SIZE_X * 0.1, SIZE_Y * 0.06);unpau
×
×
  • Create New...