do it in the editor too

This commit is contained in:
minenice55 2024-01-21 16:54:10 -05:00
parent 5c9a0b2d48
commit 2941322039
3 changed files with 6 additions and 5 deletions

View file

@ -1110,7 +1110,7 @@ namespace HeavenStudio
SetCurrentGame(game, useMinigameColor); SetCurrentGame(game, useMinigameColor);
} }
private void DestroyGame() public void DestroyGame()
{ {
SetGame("noGame"); SetGame("noGame");
} }

View file

@ -507,12 +507,12 @@ namespace HeavenStudio.Editor
public static bool MouseInRectTransform(RectTransform rectTransform) public static bool MouseInRectTransform(RectTransform rectTransform)
{ {
return (rectTransform.gameObject.activeSelf && RectTransformUtility.RectangleContainsScreenPoint(rectTransform, Input.mousePosition, Editor.instance.EditorCamera)); return rectTransform.gameObject.activeSelf && RectTransformUtility.RectangleContainsScreenPoint(rectTransform, Input.mousePosition, Editor.instance.EditorCamera);
} }
public void ReturnToTitle() public void ReturnToTitle()
{ {
GlobalGameManager.LoadScene("Title"); GlobalGameManager.LoadScene("Title", callback: GameManager.instance.DestroyGame);
} }
public void SetAuthoritiveMenu(bool state) public void SetAuthoritiveMenu(bool state)

View file

@ -39,5 +39,6 @@ MonoBehaviour:
- Assets/Scripts/Games/TossBoys/TossBoys.cs - Assets/Scripts/Games/TossBoys/TossBoys.cs
- Assets/Scripts/Games/DoubleDate/DoubleDate.cs - Assets/Scripts/Games/DoubleDate/DoubleDate.cs
- Assets/Scripts/Games/AirRally/AirRally.cs - Assets/Scripts/Games/AirRally/AirRally.cs
- Assets/Scripts/LevelEditor/Editor.cs
PathsToSkipImportEvent: [] PathsToSkipImportEvent: []
PathsToIgnoreOverwriteSettingOnAttribute: [] PathsToIgnoreOverwriteSettingOnAttribute: []