using System.Collections; using System.Collections.Generic; using UnityEngine; public class Click : MonoBehaviour { public Conversation conversation; SpriteRenderer thisRenderer; public Sprite click, not; // Start is called before the first frame update void Start() { conversation = GameObject.Find("Control").GetComponent(); thisRenderer = GetComponent(); } private void OnMouseDown() { conversation.StartRecording(); thisRenderer.sprite = click; } private void OnMouseUp() { conversation.StopRecording(); thisRenderer.sprite = not; } }