41 lines
1.1 KiB
C#
41 lines
1.1 KiB
C#
using MongoDB.Bson.Serialization.Attributes;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace ET
|
|
{
|
|
public class Task:Entity
|
|
{
|
|
public TaskTargetType TaskTargetType;
|
|
|
|
public int[] TotalAmountList;
|
|
public int[] CurrAmountList;
|
|
[BsonIgnore]
|
|
public bool IsComplete
|
|
{
|
|
get
|
|
{
|
|
if (TotalAmountList == null ) return false;
|
|
bool iscomplete = true;
|
|
for (int i = 0; i < TotalAmountList.Length; i++)
|
|
{
|
|
iscomplete = iscomplete && CurrAmountList[i] >= TotalAmountList[i];
|
|
}
|
|
return iscomplete;
|
|
}
|
|
}
|
|
}
|
|
public class UnitTask:Entity,ISerializeToEntity
|
|
{
|
|
public List<int> FinishTaskIdList { get; set; }= new List<int>();
|
|
/// <summary>
|
|
/// 待领取奖励
|
|
/// </summary>
|
|
public List<int> CompleteTaskIdList { get; set; }= new List<int>();
|
|
public List<Task> RunningTaskList{ get; set; } = new List<Task>();
|
|
//!日常任务数 6
|
|
public long[] DateTimeArr = new long[6];
|
|
}
|
|
}
|