public void OnPassengerSpawned(int index, GameObject go) { if (index >= 0 && index < this._passengerIds.Length) { PassengerView component = go.GetComponent <PassengerView>(); if (component) { component._id = this._passengerIds[index]; go.GetComponent <Collider>().enabled = true; } } }
private IEnumerator SetupPassenger(int index, BundledPrefabLoader loader) { while (loader && !loader.Instance && loader.Loading) { yield return(null); } if (loader && loader.Instance) { PassengerView component = loader.Instance.GetComponent <PassengerView>(); if (component) { component._id = this._passengerIds[index]; loader.Instance.GetComponent <Collider>().enabled = true; } } yield break; }
public void OnPassengerSpawned(int index, GameObject go) { if (index >= 0 && index < this._passengerIds.Length) { BundledPrefabLoader component = go.GetComponent <BundledPrefabLoader>(); if (component) { base.StartCoroutine(this.SetupPassenger(index, component)); } else { PassengerView component2 = go.GetComponent <PassengerView>(); if (component2) { component2._id = this._passengerIds[index]; go.GetComponent <Collider>().enabled = true; } } } }