namespace PixelCamera
{
using UnityEngine;
///
/// Example on how to use mouse events with the camera system.
///
public class PointerDemo : MonoBehaviour
{
// https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnMouseEnter.html
Renderer rend;
void Start()
{
this.rend = this.GetComponent();
}
void OnMouseEnter()
{
this.rend.material.color = Color.red;
}
void OnMouseOver()
{
this.rend.material.color -= new Color(0.1F, 0, 0) * Time.deltaTime;
}
void OnMouseExit()
{
this.rend.material.color = Color.white;
}
}
}