Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

OnMousedown unity ui

public class Combat_spell : MonoBehaviour, IPointerClickHandler,
 IPointerExitHandler, IPointerEnterHandler
{
    public void OnPointerClick(PointerEventData eventData)
    {
        UseSpell();
    }

    public void OnPointerEnter(PointerEventData eventData)
    {
        Scene_Main.display_Description("Frappe", "Inflige 5 à 7 dégats", 3, -2, this.transform.position, 3);
    }

    public void OnPointerExit(PointerEventData eventData)
    {
        Scene_Main.display_Description_Erase();
    }
}
Source by nullorempty.org #
 
PREVIOUS NEXT
Tagged: #OnMousedown #unity #ui
ADD COMMENT
Topic
Name
3+1 =