// Start is called before the first frame update void Start() { if (!GameManager.Instance.CursorActive) { AppEvents.Invoke_MouseCursorEnable(true); } RoomText.text = "Room: " + RewardManager.Instance?.room.ToString(); }
public void UnpauseGame() { var pausables = FindObjectsOfType <MonoBehaviour>().OfType <IPausable>(); foreach (IPausable pauseObject in pausables) { pauseObject.UnpauseGame(); } Time.timeScale = 1; AppEvents.Invoke_MouseCursorEnable(false); }
private void Awake() { MenuController = FindObjectOfType <MenuController>(); if (MenuController) { MenuController.AddMenu(MenuName, this); } else { Debug.Log("MenuController not found."); } AppEvents.Invoke_MouseCursorEnable(true); }
// Start is called before the first frame update void Start() { if (GameManager.Instance.CursorActive) { AppEvents.Invoke_MouseCursorEnable(false); } CrosshairStartingPoint = new Vector2(Screen.width * 0.5f, Screen.height * 0.5f); HorizontalConstraint = (Screen.width * HorizontalPercentageContraint) * 0.5f; MinHorizontalContraintValue = -(Screen.width * 0.5f) + HorizontalConstraint; MaxHorizontalContraintValue = (Screen.width * 0.5f) - HorizontalConstraint; VerticalConstraint = (Screen.height * VerticalPercentageContraint) * 0.5f; MinVerticalContraintValue = -(Screen.height * 0.5f) + VerticalConstraint; MaxVerticalContraintValue = (Screen.height * 0.5f) - VerticalConstraint; }
private void Start() { if (GameManager.Instance.CursorActive) { AppEvents.Invoke_MouseCursorEnable(false); } crosshairStartingPosition = new Vector2(Screen.width / 2f, Screen.height / 2f); horizontalConstrain = (Screen.width * horizontalPercentageConstrain) / 2f; minHorizontalConstrainValue = -(Screen.width / 2) + horizontalConstrain; maxHorizontalConstrainValue = (Screen.width / 2) - horizontalConstrain; verticalConstrain = (Screen.height * verticalPercentageConstrain) * 2f; minVerticalConstrainValue = -(Screen.height / 2f) + verticalConstrain; maxVerticalConstrainValue = (Screen.height / 2f) - verticalConstrain; }
// Start is called before the first frame update void Start() { if (GameManager.instance.CursorEnabled) { AppEvents.Invoke_MouseCursorEnable(false); } ReticleStartingPosition = new Vector2(Screen.width / 2.0f, Screen.height / 2.0f); HorizontalOffset = (Screen.width * hConstraintRatio) / 2.0f; VerticalOffset = (Screen.height * vConstraintRatio) / 2.0f; MinHCon = -(Screen.width / 2) + HorizontalOffset; MaxHCon = (Screen.width / 2) - HorizontalOffset; MinVCon = -(Screen.height / 2) + VerticalOffset; MaxVCon = (Screen.height / 2) - VerticalOffset; }