// Generate By EToy
// Don't Edit It!!
using XGame.Framework.Database;
using XGame.Framework.Serialization;
namespace XGame.Database
{
/// Map
public sealed class MapTable : ITable
{
long ITable.Key => Id;
/// 主键
public int Id { get; private set; }
/// 地图名字
public string Name { get; private set; }
/// 资源名字
public string AssetName { get; private set; } // c
/// 玩家出生点
public Vec3 PlayerBirth { get; private set; }
/// 战斗地点,使用哪个由Chapter.part决定
public Vec3[] BattlePositions { get; private set; }
/// 怪物出生点,一个取中间,2个左右对称偏移
public Vec3[] MonsterPositions { get; private set; }
void ISerializable.Deserialize(IReader reader)
{
Id = reader.ReadInt();
Name = reader.ReadString();
AssetName = reader.ReadString();
PlayerBirth = reader.ReadSerializable();
BattlePositions = reader.ReadEnumerable();
MonsterPositions = reader.ReadEnumerable();
}
void ISerializable.Serialize(IWriter writer)
{
writer.Write(Id);
writer.Write(Name);
writer.Write(AssetName);
writer.Write(PlayerBirth);
writer.Write(BattlePositions);
writer.Write(MonsterPositions);
}
}
}