1
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace MuHua {
|
||||
/// <summary>
|
||||
/// 数据预制件
|
||||
/// </summary>
|
||||
public abstract class ModulePrefab<T> : MonoBehaviour where T : ModuleData<T> {
|
||||
/// <summary> 关联的数据 </summary>
|
||||
protected T value;
|
||||
|
||||
/// <summary> 关联的数据 </summary>
|
||||
public virtual T Value => value;
|
||||
/// <summary> 更新可视化内容 </summary>
|
||||
public virtual void UpdateVisual(T value) => this.value = value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user