11
This commit is contained in:
parent
80d3a482b7
commit
0a5ef9135c
@ -72,7 +72,7 @@ namespace AlicizaX
|
|||||||
/// 自动注册到 SingletonManager。
|
/// 自动注册到 SingletonManager。
|
||||||
/// 支持动态创建与销毁。
|
/// 支持动态创建与销毁。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class Singleton<T> : MonoBehaviour where T : Component
|
public abstract class MonoSingleton<T> : MonoBehaviour where T : Component
|
||||||
{
|
{
|
||||||
private static T _instance;
|
private static T _instance;
|
||||||
private static readonly object _lock = new();
|
private static readonly object _lock = new();
|
||||||
|
|||||||
@ -1,28 +0,0 @@
|
|||||||
using System;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace AlicizaX
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public struct Tag
|
|
||||||
{
|
|
||||||
public string tag;
|
|
||||||
|
|
||||||
public static implicit operator string(Tag tag)
|
|
||||||
{
|
|
||||||
return tag.tag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static implicit operator Tag(string tag)
|
|
||||||
{
|
|
||||||
Tag result = default;
|
|
||||||
result.tag = tag;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool CompareTag(GameObject obj)
|
|
||||||
{
|
|
||||||
return obj.CompareTag(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 431d94b8a8d5f5f4fa780e79c149f880
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Loading…
Reference in New Issue
Block a user