Sign in to follow this  
Dio

Semi-transparent overlay on button/sprite on inventory item

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?

Share this post


Link to post
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.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.