Jump to content

Semi-transparent overlay on button/sprite on inventory item


Dio
 Share

Recommended Posts

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?

Link to comment
Share on other sites

I dont know if this is the best way, but i created inventory using php and data base.
One div is for game, second div is for inventory loaded from data base using ajax jquery. last div is showing chosen element, which was clicked in second div.

Then in to the game You must load which element is chosen and them create in in phaser screen where the player clicked.

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...