/// <summary>
 ///
 /// </summary>
 void Awake()
 {
     if (AutoDestroy)
     {
         Destroy(gameObject, DestroyIn);
     }
     PUM          = FindObjectOfType <bl_PickGunManager>();
     UIReferences = bl_UIReferences.Instance;
 }
Exemple #2
0
 /// <summary>
 ///
 /// </summary>
 protected override void Awake()
 {
     if (!PhotonNetwork.IsConnected)
     {
         return;
     }
     base.Awake();
     PUM          = FindObjectOfType <bl_PickGunManager>();
     UIReferences = bl_UIReferences.Instance;
     CacheGun     = bl_GameData.Instance.GetWeapon(GunID);
     uniqueLocal  = (byte)Random.Range(0, 9998);
 }
Exemple #3
0
    /// <summary>
    ///
    /// </summary>
    void Awake()
    {
        PUM = FindObjectOfType <bl_PickGunManager>();
        //when player instance select player class select in bl_RoomMenu
        GetClass();

        //Desactive all weapons in children and take the first
        foreach (bl_Gun g in PlayerEquip)
        {
            g.Setup(true);
        }
        foreach (bl_Gun guns in AllGuns)
        {
            guns.gameObject.SetActive(false);
        }
        TakeWeapon(PlayerEquip[m_Current].gameObject);
    }
    /// <summary>
    ///
    /// </summary>
    protected override void Awake()
    {
        base.Awake();
        PUM     = FindObjectOfType <bl_PickGunManager>();
        ASource = GetComponent <AudioSource>();
#if GR
        if (transform.root.GetComponent <PhotonView>().IsMine)
        {
            GunRace = FindObjectOfType <bl_GunRace>();
            if (GunRace != null)
            {
                GunRace.SetGunManager(this);
            }
            else
            {
                Debug.Log("Gun Race is not integrated in this map, just go to MFPS -> Addons -> Gun Race -> Integrate, with the map scene open).");
            }
        }
#endif
        //when player instance select player class select in bl_RoomMenu
        GetClass();
    }