// PlayerDie internal static void PlayerDie() { MenuElements.SetActive(true); #if TOUCH_CONTROLS_KIT TCKInput.SetActive(false); #endif }
// OnGUI void OnGUI() { if (GUI.Button(disBtnSize, "Enable / Disable \nControllers")) { TCKInput.SetActive(!TCKInput.isActive); } if (!TCKInput.isActive) { return; } if (GUI.Button(hideBtnSize, "Show / Hide \nTouch Zones")) { showingTouchzones = !showingTouchzones; TCKInput.ShowingTouchZone(showingTouchzones); } // Left Window if (windowsEnabled) { GUILayout.BeginArea(leftWindow); GUILayout.BeginVertical("Box"); SetGuiStyle("<b>Joystick</b>"); Axes("Joystick"); //Sens( "Joystick" ); GUILayout.EndVertical(); GUILayout.EndArea(); } // Right Window if (windowsEnabled) { GUILayout.BeginArea(rightWindow); GUILayout.BeginVertical("Box"); SetGuiStyle("<b>Touchpad</b>"); Axes("Touchpad"); Sens("Touchpad"); GUILayout.EndVertical(); GUILayout.EndArea(); } }
// Pause public static void Pause() { if (!PlayerCharacter.Instance.isAlive) { return; } gameIsPaused = !gameIsPaused; Time.timeScale = gameIsPaused ? 0f : 1f; MenuElements.SetActive(gameIsPaused); // if (GameSettings.ShowHud) { HudElements.SetActive(!gameIsPaused); } #if TOUCH_CONTROLS_KIT TCKInput.SetActive(!gameIsPaused); #endif }