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"); } }
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"); } }
/// <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); } } }
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"); } }
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); } } }