• Content count

  • Joined

  • Last visited

  1. Dio

    Creating a Progress bar using sprite.scale

    The link does not work. Anyway, maybe you could make bar using crop instead of scaling? Something like here with health bar: http://codepen.io/jdnichollsc/pen/oXXRMz
  2. Dio

    Image, Button or Sprite?

    Thanks for confirmation. I went with deriving from Image though.
  3. Hi, Is it possible to create conveyor belt effect with Arcade physics system? Like this example made with box2d, but on Arcade http://phaser.io/examples/v2/box2d/conveyor-belt#gv Of course, conveyor tracks will have to be horizontal.
  4. Dio

    Image, Button or Sprite?

    Hi, I would like to understand which option should I choose for a clickable image: My assumptions are: if I want my "button" to participate in physics, I should go with a Sprite. If my "button" does not involve physics, I can choose either Button or Image. Button from images differs that they have functionality to show different image frames for different states of a button (out, over, up). If I do not want my button to have different states, i should go with Image. Are my assumptions correct? Can you provide more real life scenarios when you have chosen one type of clickable image or the other and reasons behind that decision. For example, currently I would like to implement inventory item which is a rectangle shaped image. When user clicks it, button should show that the inventory item is selected by showing a dashed red rectangle with rounded corners around the item. As I understand, I should go with Image because I need "selected" state, which Button does not currently have and I have to implement it myself anyway. I do not know whats the best way to implement that dashed rectangle around the inventory item though - I would like to have it reused since all inventory items presumably have the same dimensions.
  5. Hi, I am trying to figure out whats the best way to create an inventory item (which could be an image, sprite or a button) with partial semi-transparent overlay. The idea is that user clicks on (enabled) inventory item, and then clicks on game area which puts that item on game area. That inventory item should be disabled for a specific period of time. What I am thinking is adding grey semi-transparent overlay on a button, which grows from bottom to top proportionally by be time elapsed. When time elapses, button is enabled again and overlay is removed. What's the correct way to do that?