using System.Collections; using System.Collections.Generic; using FlowerPower; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; public class gemCrush : MonoBehaviour { public GameObject bg; public void setGemBackground(string alp) { int a = int.Parse(alp); Color cl = bg.GetComponent().color; cl.a = a; //bg为游戏背景图片 bg.GetComponent().color = cl; } }