zxl
/
CTT
forked from Cal/CTT
1
0
Fork 0
CTT/Server/Model/Game/Entity/User/Pet.cs

31 lines
939 B
C#
Executable File

using Cal;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
namespace ET
{
[BsonIgnoreExtraElements]
public class Pet: Entity, ICombatBounds
{
public enum PetState{Idle,Follow,Play,Experience,Explore}
public int petId;
public string name;
public int level;
public int exp;
public PetState petState;
/// <summary>
/// 亲密度
/// </summary>
public int intimacy;
public bool isShow;
public long actionEndTime;
[BsonRepresentation(MongoDB.Bson.BsonType.Double, AllowTruncation = true)]
[BsonDictionaryOptions(Representation = MongoDB.Bson.Serialization.Options.DictionaryRepresentation.ArrayOfArrays)]
public Dictionary<int, float> addToCharacter = new();
[BsonIgnore]
public Func<AttributeType, float> getAttributeFunc { get ; set; }
}
}