This commit is contained in:
JA
2026-06-27 03:36:46 +08:00
parent aec4e97d27
commit 7a8d4a5d83
1215 changed files with 48271 additions and 146052 deletions

View File

@@ -1,38 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class MonoSingleton<T> : MonoBehaviour where T : MonoBehaviour
{
public bool global=true;
private static T instance;
public static T Instance
{
get
{
if (instance == null)
instance = FindObjectOfType<T>();
return instance;
}
}
void Awake()
{
if (global)
{
if (instance != null && instance != this.gameObject.GetComponent<T>())
{
Destroy(this.gameObject);
return;
}
DontDestroyOnLoad(this.gameObject);
instance = this.gameObject.GetComponent<T>();
}
this.OnStart();
}
protected virtual void OnStart()
{
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 29d9d55349331304fb3da0aa1c10e559
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
class Resloader
{
public static T Load<T>(string path) where T : UnityEngine.Object
{
return Resources.Load<T>(path);
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 6e7452ecf3eb2b94c8af2b8b2f16c9ac
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: