void Start() { Initialize_AI(); GameObject GameManagerContainerGameObject = GameObject.Find("_RaceManager"); RaceManager = (Race_Manager)GameManagerContainerGameObject.GetComponent(typeof(Race_Manager)); if (RaceManager == null) { Debug.Log("Racemanager not found!"); } RaceRegister = (Racer_Register)transform.GetComponent(typeof(Racer_Register)); if (RaceRegister == null) { Debug.Log("Race Register not found!"); } RGKCarController = (IRGKCarController)transform.GetComponent(typeof(IRGKCarController)); if (RGKCarController == null) { Debug.Log("Car Controller not found!"); } waypointContainer = RaceManager.Waypoints; GetWaypoints(); }
void Start() { Initialize_AI(); GameObject GameManagerContainerGameObject = GameObject.Find("_RaceManager"); RaceManager = (Race_Manager)GameManagerContainerGameObject.GetComponent(typeof(Race_Manager)); waypointContainer = RaceManager.Waypoints; RaceRegister = (Racer_Register)transform.GetComponent(typeof(Racer_Register)); RGKCarController = (IRGKCarController)transform.GetComponent(typeof(IRGKCarController)); GetWaypoints(); }