Files
Cielonos/Assets/Scripts/MainGame/Managers/MainGameManager.cs

59 lines
1.4 KiB
C#
Raw Normal View History

2025-12-22 18:36:29 -05:00
using System;
2026-02-13 09:22:11 -05:00
using Cielonos.Core;
2025-11-25 08:19:33 -05:00
using Cielonos.MainGame.Characters;
2026-02-13 09:22:11 -05:00
using SLSUtilities.General;
2025-11-25 08:19:33 -05:00
using UnityEngine;
2026-03-20 12:07:44 -04:00
using UnityEngine.InputSystem;
2026-02-13 09:22:11 -05:00
using UnityEngine.Serialization;
2025-11-25 08:19:33 -05:00
namespace Cielonos.MainGame
{
public partial class MainGameManager : Singleton<MainGameManager>
{
public Player player;
2026-03-20 12:07:44 -04:00
public AttributeSubmodule globalAttributeSm => player.globalAttributeSm;
2026-02-13 09:22:11 -05:00
public MainGameBaseCollection baseCollection;
2025-11-25 08:19:33 -05:00
protected override void Awake()
{
base.Awake();
2025-12-22 18:36:29 -05:00
}
private void Start()
{
2026-03-20 12:07:44 -04:00
Application.targetFrameRate = 120;
2025-11-25 08:19:33 -05:00
}
2025-12-23 19:47:06 -05:00
private void Update()
{
2026-03-20 12:07:44 -04:00
#if UNITY_EDITOR
#else
if(Keyboard.current.escapeKey.wasPressedThisFrame)
2025-12-23 19:47:06 -05:00
{
2026-03-20 12:07:44 -04:00
if (Cursor.lockState == CursorLockMode.Locked)
{
Cursor.lockState = CursorLockMode.None;
Cursor.visible = true;
}
else
{
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
}
2025-12-23 19:47:06 -05:00
}
2026-03-20 12:07:44 -04:00
#endif
2025-12-23 19:47:06 -05:00
}
2025-11-25 08:19:33 -05:00
}
public partial class MainGameManager
{
public static Player Player => Instance.player;
2026-02-13 09:22:11 -05:00
public static MainGameBaseCollection BaseCollection => Instance.baseCollection;
2025-11-25 08:19:33 -05:00
}
}
namespace Cielonos.MainGame
{
}