using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
///
/// 单个独立模块
///
public abstract class ModuleSingle : MonoBehaviour {
/// 模块单例
public static ModuleSingle I => instance;
/// 模块单例
protected static ModuleSingle instance;
/// 初始化
protected virtual void Awake() {
if (instance != null) { Destroy(instance.gameObject); }
instance = this;
}
/// 打开
public virtual void Open(Data data) { throw new NotImplementedException(); }
/// 完成
public virtual void Complete() { throw new NotImplementedException(); }
/// 关闭
public virtual void Close() { throw new NotImplementedException(); }
}