Conqarous

Members
  • Content Count

    7
  • Joined

  • Last visited

  1. In one state I'm using Phaser.RenderTexture, game.make.bitmapData and they reduce framerate in the next state. Is there a way to get rid of them completely? 1) I'm switching the state. 2) Using .destroy() for bitmapData, RenderTexture and sprite which uses RenderTexture. What else can be done? Remove them from cache? Thanks in advance. P.S. using CANVAS mode
  2. Ok, googling helped: coordinates must be counter-clockwise from bottom right. For some weird reason after adding polygon the anchor point gets messed up.
  3. Hey, I'm trying to add a custom collision polygon for a hexagon. I've measured the corners of my hexagon in illustrator: 28, 055,1655,4828,00,480,16 When I try to implement it:game.physics.p2.enable(hexagon, true);hexagon.body.clearShapes();hexagon.body.addPolygon( {} , [[28,0],[55,16],[55,48],[28,0],[0,48],[0,16]]);The collision polygon is not visible at all (in debugger). I've never tried adding a custom polygon so I have no idea what I'm doing wrong. Thanks.
  4. This is exactly what I needed! Your are awesome! Thank you.
  5. Hey, maybe someone solved this problem before. Lets say I have a variable from 0 to 100. How can I map it to the tint color for the sprite? I.e.: when variable is at 0 -> sprite.tint = white; [everything in between] when variable is at maximum (100) -> sprite.tint = red; Thanks!
  6. Sorry for my ignorance but how do you transition the position x, y (i.e. sliding down)? Alpha, scale, angle work perfectly. Awesome job on the plugin!
  7. Hey guys, How can I get the 'index' attribute from a class to use it in a for loop? new stars are pushed into starsList = []; 'p_id' here is compared to the 'index' value in starsList starsList.star.id or starsList.id do not work, what is the correct way? I'm a total newbie. Thanks in advance! And here is the class: