namespace ET.Server
{
    /// <summary>
    /// 场景数据
    /// </summary>
    public class AreaData
    {
        public MapConfig prop { get; set; }
        public int areaId { get; set; }
        public long instanceId { get; set; }
        public float targetX { get; set; }
        public float targetY { get; set; }
        public int logicServerId { get; set; }
        public ENTER_TYPE enterType = ENTER_TYPE.NONE;

        public AreaData(int areaId)
        {
            this.prop = MapConfigCategory.Instance.Get(areaId);
            this.areaId = areaId;
        }

        public AreaData(MapConfig prop)
        {
            this.areaId = prop.Id;
            this.prop = prop;
        }

        public AreaData(int areaId, long instanceId)
        {
            this.prop = MapConfigCategory.Instance.Get(areaId);
            this.areaId = areaId;
            this.instanceId = instanceId;
        }

        public AreaData(int areaId, float targetX, float targetY)
        {
            this.prop = MapConfigCategory.Instance.Get(areaId);
            this.areaId = areaId;
            this.targetX = targetX;
            this.targetY = targetY;
        }

        public AreaData(int areaId, float targetX, float targetY, ENTER_TYPE enterType)
        {
            this.prop = MapConfigCategory.Instance.Get(areaId);
            this.areaId = areaId;
            this.targetX = targetX;
            this.targetY = targetY;
            this.enterType = enterType;
        }

        public AreaData(int areaId, long instanceId, ENTER_TYPE enterType)
        {
            this.prop = MapConfigCategory.Instance.Get(areaId);
            this.areaId = areaId;
            this.instanceId = instanceId;
            this.enterType = enterType;
        }
    }
}