Hi Chris,
Just a quick one and was wondering if possible...
Like the title says, was looking to play an animation on a sprite when over a hotspot. Not sure if this feature is implemented, or if i just cant think of a way (or find it).
If not, no big worries, would have been nice to animate the back arrow when mouse is over the hotspot is all.
Cheers
Gavin
EDIT: btw is there like a HD resolution image of the adventure creator logo somewhere that I can use as a splash screen on game boot up? (png file preferably)
Feels only right
Comments
if (AC.KickStarter.playerInteraction.GetActiveHotspot () != null)
{
// Play some animation
}
Thanks - an HD logo can be downloaded here.
Not animation of mouse.
The sprite is a gameobject with a sprite rendered on it. Which also has a animator controller on it.
So do i assume that i just put this code on the hotspot, and call the gameobject animation?
Thanks
Gavin
A tutorial on custom events can be found here, but the general principle is:
private void OnEnable ()
{
EventManager.OnHotspotSelect += MySelect;
}
private void MySelect (Hotspot hotspot)
{
Debug.Log ("Select: " + hotspot);
}
Since the Hotspot being selected is a parameter, you can use that to determine if the correct Hotspot is being selected. A similar event exists for deselecting - OnHotspotDeselect.