Esempio n. 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="c"></param>
 void OnTriggerEnter(Collider c)
 {
     if (c.transform.tag == bl_PlayerPhoton.PlayerTag)
     {
         bl_PlayerPhoton p = c.GetComponent <bl_PlayerPhoton>();
         if (p.isLocalPlayer)
         {
             PickUp();
         }
     }
     //Pick up with vehicles
     if (CanVehiclePickup)
     {
         if (c.transform.tag == "Vehicle")
         {
             if (c.transform.root.GetComponent <bl_CarManager>() != null)
             {
                 bl_CarManager cm = c.transform.root.GetComponent <bl_CarManager>();
                 if (cm.inMyControl)
                 {
                     PickUp();
                 }
             }
         }
     }
 }
Esempio n. 2
0
 void Awake()
 {
     if(GetComponent<bl_CarManager>() != null)
     {
         CarManager = GetComponent<bl_CarManager>();
     }
     if (GetComponent<bl_Passenger>() != null)
     {
         Passenger = GetComponent<bl_Passenger>();
     }
     if (GetComponent<bl_JetManager>() != null)
     {
         JetManager = GetComponent<bl_JetManager>();
     }
 }
Esempio n. 3
0
 void Awake()
 {
     if (GetComponent <bl_CarManager>() != null)
     {
         CarManager = GetComponent <bl_CarManager>();
     }
     if (GetComponent <bl_Passenger>() != null)
     {
         Passenger = GetComponent <bl_Passenger>();
     }
     if (GetComponent <bl_JetManager>() != null)
     {
         JetManager = GetComponent <bl_JetManager>();
     }
 }