1
Fork 0
mirror of https://github.com/Steffo99/beat-td.git synced 2024-11-30 18:54:19 +00:00
beat-td/Assets/Scripts/ChangeSpriteOnHover.cs

29 lines
451 B
C#
Raw Normal View History

2018-04-23 08:45:40 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ChangeSpriteOnHover : MonoBehaviour {
public Sprite enter;
public Sprite exit;
private Image image;
void Start()
{
image = gameObject.GetComponent<Image>();
}
void OnMouseEnter()
{
image.sprite = enter;
}
void OnMouseExit()
{
image.sprite = exit;
}
}