You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.3 KiB
40 lines
1.3 KiB
using System.Collections.Generic; |
|
using System.Runtime.CompilerServices; |
|
using MongoDB.Bson.Serialization.Attributes; |
|
using MongoDB.Bson.Serialization.Options; |
|
using UnityEngine; |
|
namespace ET |
|
{ |
|
public struct ExtraOut |
|
{ |
|
public int CfgId; //allitem表的Id |
|
public int MaxAmount; |
|
public int GatherAmount; |
|
} |
|
public struct ResourceAttri |
|
{ |
|
public int ConfigId; |
|
public int MaxAmount; |
|
public int GatherAmount; //当前采集了多少 |
|
public List<ExtraOut> ExtraOuts; //额外产出 |
|
// [BsonIgnore] |
|
//public ResourcesConfig Config => ResourcesConfigCategory.Instance.Get(this.ConfigId); |
|
|
|
|
|
} |
|
public class ResourcePoint: Entity, IAwake,ISerializeToEntity |
|
{ |
|
public int ConfigId; |
|
public Vector2 Position; |
|
public int MatureState; //1表示已经成熟,2表示未成熟 |
|
public long GatherId; //采集id |
|
public long MonsterGroupId; |
|
|
|
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)] |
|
public Dictionary<int, ResourceAttri> ResAttriDic = new Dictionary<int, ResourceAttri>(); |
|
|
|
[BsonIgnore] |
|
public ResourcesPointConfig Config => ResourcesPointConfigCategory.Instance.Get(this.ConfigId); |
|
|
|
} |
|
} |