PictureAction

Open the PictureAction.cs script and modify it to use mouse events so that it reads as follows:

File: PictureAction.cs
using UnityEngine; public class PictureAction : MonoBehaviour { public PictureCommand command; protected PictureController picture; protected Animator animator; void Start() { picture = GetComponentInParent<PictureController>(); animator = GetComponent<Animator>(); } void OnMouseDown() { if (animator != null) { animator.SetTrigger("Click"); } GameController.instance.PlayClickFeedback(); Invoke("DoExecute", 1); } void DoExecute() { picture.Execute(command); } }
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset