input相关
This commit is contained in:
30
Assets/Scripts/Common/PermanentCommon.cs
Normal file
30
Assets/Scripts/Common/PermanentCommon.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using NBC;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
/// <summary>
|
||||
/// 常驻公共脚本
|
||||
/// </summary>
|
||||
public class PermanentCommon
|
||||
{
|
||||
private static bool _init;
|
||||
private static PermanentCommon _inst;
|
||||
|
||||
public static PermanentCommon Inst
|
||||
{
|
||||
get { return _inst ??= new PermanentCommon(); }
|
||||
}
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
if (_init) return;
|
||||
_init = true;
|
||||
}
|
||||
|
||||
public static void Dispose()
|
||||
{
|
||||
_init = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user