/// <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_VehicleManager>() != null)
             {
                 bl_VehicleManager cm = c.transform.root.GetComponent <bl_VehicleManager>();
                 if (cm.inMyControl)
                 {
                     PickUp();
                 }
             }
         }
     }
 }
 /// <summary>
 ///
 /// </summary>
 void Awake()
 {
     PlayerUI       = FindObjectOfType <bl_PlayerUI>();
     PlayerAnim     = transform.GetComponent <bl_PlayerSync>().m_PlayerAnimation;
     GameController = FindObjectOfType <bl_GameController>();
     PlayerPhoton   = GetComponent <bl_PlayerPhoton>();
     PlayerCar      = GetComponent <bl_PlayerCar>();
     PlayerUI.SetHealth(Health);
     PlayerUI.DeathUI.SetActive(false);
 }
Beispiel #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="c"></param>
 void OnTriggerExit(Collider c)
 {
     if (c.transform.tag == bl_PlayerPhoton.PlayerTag)
     {
         bl_PlayerPhoton p = c.GetComponent <bl_PlayerPhoton>();
         if (p.isLocalPlayer)
         {
             m_Into = false;
             DoorText.SetActive(false);
         }
     }
 }