using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; public class ClampAmmetersManager : MonoBehaviour { [SerializeField] List clampAmmetersInteractives= new List(); public Dictionary data = new Dictionary(); private void Awake() { run(); } // Start is called before the first frame update void Start() { } /// /// 获取低下预设数据 /// void run() { clampAmmetersInteractives = GetComponentsInChildren().ToList(); } void init() { for (int i = 0; i < data.Count; i++) { clampAmmetersInteractives[i].Fuan = data[i]; } } }