Hi,
In my current project I got the task to create hover state button like candy crush buttons where:
- user press down the button -> moves out the button (and the button goes up) -> moves back in to the button (button goes down) -> user releases the button (button is activated)
You can check this movement here ->
https://www.youtube.com/watch?v=f-YXqNoC54g Because it’s a video about a buggy function the reaction is the the contrary as intended but you can get a clue of what is the objective.
Well I try to do this with tk2dUIHoveItem or hover states, but I had no success because hover states only works with the mouse and my game is for the mobile devices.
To solve this I added this lines of code in line 308 of tk2dUIItem.cs on the function public void
CurrentOverUIItem(tk2dUIItem overUIItem) else if(!isPressed)
{
Press(overUIItem.Touch);
if (parentUIItem != null)
{
parentUIItem.CurrentOverUIItem(overUIItem);
}
}
I would kindly ask if this effect could be added to 2D toolkit (if a flag like the hover is) so we could have cool effect like candy crush does. If not on every update I’ll add that code
Cheers