// Set Active internal static void SetActive(ECrosshairView view) { bool pointActive = false, upActive = false, downActive = false, leftActive = false, rightActive = false; switch (view) { case ECrosshairView.None: break; case ECrosshairView.OnlyPoint: pointActive = true; break; case ECrosshairView.OnlyCross: upActive = downActive = leftActive = rightActive = true; break; case ECrosshairView.All: pointActive = upActive = downActive = leftActive = rightActive = true; break; } m_Instance.pointRT.gameObject.SetActive(pointActive); m_Instance.upRT.gameObject.SetActive(upActive); m_Instance.downRT.gameObject.SetActive(downActive); m_Instance.leftRT.gameObject.SetActive(leftActive); m_Instance.rightRT.gameObject.SetActive(rightActive); }
// Update InformerAndCrosshair private static void UpdateInformerAndCrosshair() { ECrosshairView tmpView = ECrosshairView.None; if (weaponIndex >= 0) { if (GameSettings.ShowCrosshair && !FirstPersonWeaponSway.ironsightZoomed && !FirstPersonWeaponSway.ironsightZooming) { tmpView = weaponGo.GetComponentInChildren <FirstPersonWeaponSway>().crosshairView; } } else { FirstPersonWeaponSway.moveSpeed = 1f; } HudElements.Crosshair.SetActive(tmpView); HudElements.WeaponInformer.SetActive(weaponIndex >= 0 && !isMelee); }