using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class BtClick : MonoBehaviour { public Sprite clickSprite; private Sprite defaultSprite; public CarType carType; private Image image; public event Action OnStartCompleted; private void Awake() { image = this.GetComponent(); defaultSprite = image.sprite; } private void Start() { switch (carType) { case CarType.首页: GameManager.instance.home.Add(this.GetComponent()); break; case CarType.车类型: GameManager.instance.carType.Add(this.GetComponent()); break; case CarType.天气: GameManager.instance.weather.Add(this.GetComponent()); break; case CarType.危险驾驶: GameManager.instance.dangerDriving.Add(this.GetComponent()); break; } this.GetComponent