mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-12-05 08:09:02 +00:00
添加任务系统
This commit is contained in:
parent
725e6e03f9
commit
0416f4de9e
33
Entity/System/Quest.cs
Normal file
33
Entity/System/Quest.cs
Normal file
@ -0,0 +1,33 @@
|
||||
namespace Milimoe.FunGame.Core.Entity
|
||||
{
|
||||
public class Quest()
|
||||
{
|
||||
public int Id { get; set; } = 0;
|
||||
public string Name { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
public int EstimatedMinutes { get; set; } = 0;
|
||||
public int Status { get; set; } = 0;
|
||||
public int CharacterIndex { get; set; } = 0;
|
||||
public Dictionary<string, int> Awards { get; set; } = [];
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Id}. {Name}\r\n" +
|
||||
$"{Description}\r\n" +
|
||||
$"需要时间:{EstimatedMinutes} 分钟\r\n" +
|
||||
$"奖励:{string.Join(",", Awards.Select(kv=> kv.Key + " * " + kv.Value))}\r\n" +
|
||||
$"是否完成:{GetStatus()}";
|
||||
}
|
||||
|
||||
private string GetStatus()
|
||||
{
|
||||
return Status switch
|
||||
{
|
||||
1 => "进行中",
|
||||
2 => "已完成",
|
||||
3 => "已结算",
|
||||
_ => "未开始"
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user