fix:1、添加项目
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
|
||||
namespace FlowerPower
|
||||
{
|
||||
|
||||
public abstract class BaseInterfaceManager<T> : IDisposable, InterfaceManager where T : BaseInterfaceManager<T>, new()
|
||||
{
|
||||
public bool IsInit { get; private set; }
|
||||
public bool IsStartUp { get; private set; }
|
||||
public bool IsDispose { get; private set; }
|
||||
|
||||
private static T m_instance;
|
||||
|
||||
public static T Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_instance == null)
|
||||
{
|
||||
m_instance = new T();
|
||||
m_instance.New();
|
||||
}
|
||||
|
||||
return m_instance;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void New()
|
||||
{
|
||||
IsDispose = false;
|
||||
}
|
||||
|
||||
public virtual void Init()
|
||||
{
|
||||
IsInit = true;
|
||||
}
|
||||
|
||||
public virtual void StartUp()
|
||||
{
|
||||
IsStartUp = true;
|
||||
}
|
||||
|
||||
public virtual void DisposeBefore()
|
||||
{
|
||||
IsDispose = true;
|
||||
IsInit = false;
|
||||
IsStartUp = false;
|
||||
}
|
||||
|
||||
public virtual void Dispose()
|
||||
{
|
||||
m_instance = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0395f071bf7ad864083ee86433bcec9b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,39 @@
|
||||
namespace FlowerPower
|
||||
{
|
||||
|
||||
public abstract class BaseUnityManager<T> : SingletonUnity<T>, InterfaceManager
|
||||
where T : BaseUnityManager<T>
|
||||
{
|
||||
public bool IsInit { get; private set; }
|
||||
public bool IsStartUp { get; private set; }
|
||||
public bool IsDispose { get; private set; }
|
||||
|
||||
protected override string ParentRootName
|
||||
{
|
||||
get { return AppObjConst.MonoManagerGoName; }
|
||||
}
|
||||
|
||||
protected override void New()
|
||||
{
|
||||
base.New();
|
||||
IsDispose = false;
|
||||
}
|
||||
|
||||
public virtual void Init()
|
||||
{
|
||||
IsInit = true;
|
||||
}
|
||||
|
||||
public virtual void StartUp()
|
||||
{
|
||||
IsStartUp = true;
|
||||
}
|
||||
|
||||
public virtual void DisposeBefore()
|
||||
{
|
||||
IsDispose = true;
|
||||
IsInit = false;
|
||||
IsStartUp = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8c01f68bc92a2b648a38f328f7e95ce6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace FlowerPower
|
||||
{
|
||||
public interface InterfaceManager
|
||||
{
|
||||
void Init();
|
||||
void StartUp();
|
||||
void DisposeBefore();
|
||||
void Dispose();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e53d06f42f51d84498ab4ffe80556de6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user