/// <summary> /// /// </summary> void Awake() { m_mouse = transform.root.GetComponentInChildren <bl_MouseLook>(); GunBob = transform.root.GetComponentInChildren <bl_GunBob>(); Sync = GameObject.FindWithTag("WeaponManager").GetComponent <bl_SyncWeapon>(); DefaultSpreat = baseSpread; DefaultMaxSpread = maxSpread; }
void Awake() { m_mouse = transform.root.GetComponentInChildren <bl_MouseLook>(); GunBob = transform.root.GetComponentInChildren <bl_GunBob>(); SwayGun = this.transform.root.GetComponentInChildren <bl_DelaySmooth>(); Sync = GameObject.FindWithTag("WeaponManager").GetComponent <bl_SyncWeapon>(); Cross = bl_UtilityHelper.GetGameManager.gameObject.GetComponent <bl_Crosshair>(); DefaultSpreat = baseSpread; DefaultMaxSpread = maxSpread; }
/// <summary> /// /// </summary> protected override void Awake() { base.Awake(); GunBob = transform.root.GetComponentInChildren <bl_GunBob>(); SwayGun = this.transform.root.GetComponentInChildren <bl_DelaySmooth>(); Sync = this.transform.root.GetComponentInChildren <bl_SyncWeapon>(); Crosshair = bl_UCrosshair.Instance; RoomMenu = FindObjectOfType <bl_RoomMenu>(); Source = GetComponent <AudioSource>(); FireTypeText = bl_UIReferences.Instance.FireTypeText; DefaultSpreat = baseSpread; DefaultMaxSpread = maxSpread; Setup(); }
/// <summary> /// /// </summary> void Awake() { if (ParentGun == null) { ParentGun = transform.parent.GetComponent <bl_Gun>(); } GunManager = transform.root.GetComponentInChildren <bl_GunManager>(); GunBob = GunManager.GetComponent <bl_GunBob>(); m_source = GetComponent <AudioSource>(); if (m_source == null) { m_source = gameObject.AddComponent <AudioSource>(); m_source.playOnAwake = false; } }
void Awake() { m_mouse = transform.root.GetComponentInChildren<bl_MouseLook>(); GunBob = transform.root.GetComponentInChildren<bl_GunBob>(); SwayGun = this.transform.root.GetComponentInChildren<bl_DelaySmooth>(); Sync = GameObject.FindWithTag("WeaponManager").GetComponent<bl_SyncWeapon>(); Cross = bl_UtilityHelper.GetGameManager.gameObject.GetComponent<bl_Crosshair>(); DefaultSpreat = baseSpread; DefaultMaxSpread = maxSpread; }