59 lines
1.4 KiB
C#
59 lines
1.4 KiB
C#
using System;
|
|
using Cielonos.Core;
|
|
using Cielonos.MainGame.Characters;
|
|
using SLSUtilities.General;
|
|
using UnityEngine;
|
|
using UnityEngine.InputSystem;
|
|
using UnityEngine.Serialization;
|
|
|
|
namespace Cielonos.MainGame
|
|
{
|
|
public partial class MainGameManager : Singleton<MainGameManager>
|
|
{
|
|
public Player player;
|
|
public AttributeSubmodule globalAttributeSm => player.globalAttributeSm;
|
|
public MainGameBaseCollection baseCollection;
|
|
|
|
protected override void Awake()
|
|
{
|
|
base.Awake();
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
Application.targetFrameRate = 120;
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
#if UNITY_EDITOR
|
|
|
|
#else
|
|
if(Keyboard.current.escapeKey.wasPressedThisFrame)
|
|
{
|
|
if (Cursor.lockState == CursorLockMode.Locked)
|
|
{
|
|
Cursor.lockState = CursorLockMode.None;
|
|
Cursor.visible = true;
|
|
}
|
|
else
|
|
{
|
|
Cursor.lockState = CursorLockMode.Locked;
|
|
Cursor.visible = false;
|
|
}
|
|
}
|
|
#endif
|
|
}
|
|
}
|
|
|
|
public partial class MainGameManager
|
|
{
|
|
public static Player Player => Instance.player;
|
|
public static MainGameBaseCollection BaseCollection => Instance.baseCollection;
|
|
}
|
|
}
|
|
|
|
namespace Cielonos.MainGame
|
|
{
|
|
|
|
} |