Beispiel #1
0
 void Awake()
 {
     audio.playOnAwake = false;
     m_upper           = this.transform.root.GetComponentInChildren <bl_UpperAnimations>();
     if (IsGun != null)
     {
         WeaponID     = IsGun.GunID;
         m_weaponType = IsGun.typeOfGun;
     }
     else
     {
         Debug.LogError("This NetworkGun No have reference of GUN");
     }
 }
Beispiel #2
0
 void Awake()
 {
     GetComponent <AudioSource>().playOnAwake = false;
     m_upper = this.transform.root.GetComponentInChildren <bl_UpperAnimations>();
     if (DesactiveOnOffAmmo)
     {
         defaultMat = DesactiveOnOffAmmo.material;
     }
     if (IsGun != null)
     {
         WeaponID     = IsGun.GunID;
         m_weaponType = IsGun.typeOfGun;
     }
     else
     {
         Debug.LogError("This NetworkGun No have reference of GUN");
     }
 }
Beispiel #3
0
 /// <summary>
 ///
 /// </summary>
 public void SetUpType()
 {
     if (m_upper != null)
     {
         m_upper.ChangeType(m_weaponType);
     }
     else
     {
         if (transform.root.GetComponentInChildren <bl_UpperAnimations>() == null)
         {
             Debug.LogError("No have bl_UpperAnimations.cs attach in this player");
         }
         else
         {
             m_upper = this.transform.root.GetComponentInChildren <bl_UpperAnimations>();
             m_upper.ChangeType(m_weaponType);
         }
     }
 }
Beispiel #4
0
 void Awake()
 {
     GetComponent<AudioSource>().playOnAwake = false;
     m_upper = this.transform.root.GetComponentInChildren<bl_UpperAnimations>();
     if (DesactiveOnOffAmmo)
     {
         defaultMat = DesactiveOnOffAmmo.material;
     }
     if (IsGun != null)
     {
         WeaponID = IsGun.GunID;
         m_weaponType = IsGun.typeOfGun;
     }
     else
     {
         Debug.LogError("This NetworkGun No have reference of GUN");
     }
 }
Beispiel #5
0
 public void SetUpType()
 {
     if (m_upper != null)
     {
         m_upper.ChangeType(m_weaponType);
     }
     else
     {
         if (transform.root.GetComponentInChildren<bl_UpperAnimations>() == null)
         {
             Debug.LogError("No have bl_UpperAnimations.cs attach in this player");
         }
         else
         {
             m_upper = this.transform.root.GetComponentInChildren<bl_UpperAnimations>();
             m_upper.ChangeType(m_weaponType);
         }
     }
 }