using System.Collections; using System.Collections.Generic; using UnityEngine; public class cs01 : MonoBehaviour { private void OnMouseDown() { this.gameObject.GetComponent().Play(); //顏色,透明度 this.gameObject.GetComponent().material.color = new Color32(215, 37, 37, 100); //縮放 this.gameObject.transform.localScale = new Vector3(0.03f, 0.045f, 0.3f); } private void OnMouseUp() { //顏色,透明度 this.gameObject.GetComponent().material.color = new Color32(255, 255, 255, 255); //縮放 this.gameObject.transform.localScale = new Vector3(0.03f, 0.06f, 0.3f); } }