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.
32 lines
1.1 KiB
32 lines
1.1 KiB
3 years ago
|
using System.Collections.Generic;
|
||
|
using MongoDB.Bson.Serialization.Attributes;
|
||
|
using MongoDB.Bson.Serialization.Options;
|
||
|
using UnityEngine;
|
||
|
namespace ET
|
||
|
{
|
||
|
public struct ResourceAttri
|
||
|
{
|
||
|
public int ConfigId;
|
||
|
public int MaxAmount;
|
||
|
public int GatherAmount; //当前采集了多少
|
||
|
[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);
|
||
|
|
||
|
}
|
||
|
}
|