예제 #1
0
 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;
         }
     }
 }
예제 #2
0
 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;
 }
예제 #3
0
 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;
             }
         }
     }
 }