70 lines
1.9 KiB
C#
70 lines
1.9 KiB
C#
namespace Models;
|
||
|
||
/// <summary>
|
||
/// 导师数据模型 (MentorModel)
|
||
/// 玩家的数值状态。
|
||
/// 单例模式。
|
||
/// </summary>
|
||
public class MentorModel : UnitModel
|
||
{
|
||
private static MentorModel _instance;
|
||
|
||
public static MentorModel Instance
|
||
{
|
||
get
|
||
{
|
||
if (_instance == null)
|
||
{
|
||
// 如果需要默认名称,这里可以硬编码或改为 Lazy 加载
|
||
_instance = new MentorModel("Player");
|
||
}
|
||
return _instance;
|
||
}
|
||
}
|
||
|
||
public enum MentorModeType
|
||
{
|
||
Worker,
|
||
Manager
|
||
}
|
||
|
||
/// <summary>
|
||
/// 精力值 (Energy)
|
||
/// 用于释放技能(画饼、PUA、甚至亲自写代码)。
|
||
/// 每回合恢复。
|
||
/// </summary>
|
||
public StatusValue Energy { get; set; }
|
||
|
||
/// <summary>
|
||
/// 经费 (Money/Funds)
|
||
/// 单位:元。用于发工资、买设备。
|
||
/// </summary>
|
||
public int Money { get; set; } = 50000;
|
||
|
||
/// <summary>
|
||
/// 学术声望 (Reputation)
|
||
/// 影响招生质量、项目申请成功率。
|
||
/// </summary>
|
||
public int Reputation { get; set; } = 0;
|
||
|
||
/// <summary>
|
||
/// 算力/数据资源 (ResearchPoints)
|
||
/// 用于攻克高难度 AI 课题。
|
||
/// </summary>
|
||
public int ResearchPoints { get; set; } = 0;
|
||
|
||
public MentorModeType Mode { get; set; } = MentorModeType.Worker;
|
||
|
||
// 私有构造函数,防止外部实例化
|
||
private MentorModel(string name) : base(name)
|
||
{
|
||
// 初始化 Energy,默认上限 10000 (100.00)
|
||
Energy = new StatusValue(new PropertyValue(10000), new PropertyValue(10000), new PropertyValue(0));
|
||
}
|
||
|
||
// 如果需要重置单例(例如新游戏),可以添加一个重置方法
|
||
public static void Reset(string name = "Player")
|
||
{
|
||
_instance = new MentorModel(name);
|
||
}
|
||
} |