Snowflake/RPG.Services.Gameserver/Game/Entity/PropEntity.cs

35 lines
813 B
C#
Raw Normal View History

2024-01-25 10:55:10 +00:00
using RPG.GameCore.Enums;
using RPG.GameCore.Level.Objects;
using RPG.Network.Proto;
namespace RPG.Services.Gameserver.Game.Entity;
internal class PropEntity : EntityBase
{
public uint PropId { get; }
public PropState State { get; set; }
public PropEntity(uint id, uint groupId, uint instanceId, LevelPropInfo info) : base(id, groupId, instanceId)
{
PropId = info.PropID;
State = info.State;
}
public override EntityType Type => EntityType.EntityProp;
public override SceneEntityInfo SceneEntityInfo
{
get
{
SceneEntityInfo info = base.SceneEntityInfo;
info.Prop = new()
{
PropId = PropId,
PropState = (uint)State
};
return info;
}
}
}