using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameRoot : MonoBehaviour { public static GameRoot Instance = null; public CarSys carSys; private void Awake() { Instance = this; //车辆系统初始化 carSys = GetComponent(); carSys.Init(); } private void Update() { carSys.CreatCar(5); } }