AreaData.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. namespace ET.Server
  2. {
  3. /// <summary>
  4. /// 场景数据
  5. /// </summary>
  6. public class AreaData
  7. {
  8. public MapConfig prop { get; set; }
  9. public int areaId { get; set; }
  10. public long instanceId { get; set; }
  11. public float targetX { get; set; }
  12. public float targetY { get; set; }
  13. public int logicServerId { get; set; }
  14. public ENTER_TYPE enterType = ENTER_TYPE.NONE;
  15. public AreaData(int areaId)
  16. {
  17. this.prop = MapConfigCategory.Instance.Get(areaId);
  18. this.areaId = areaId;
  19. }
  20. public AreaData(MapConfig prop)
  21. {
  22. this.areaId = prop.Id;
  23. this.prop = prop;
  24. }
  25. public AreaData(int areaId, long instanceId)
  26. {
  27. this.prop = MapConfigCategory.Instance.Get(areaId);
  28. this.areaId = areaId;
  29. this.instanceId = instanceId;
  30. }
  31. public AreaData(int areaId, float targetX, float targetY)
  32. {
  33. this.prop = MapConfigCategory.Instance.Get(areaId);
  34. this.areaId = areaId;
  35. this.targetX = targetX;
  36. this.targetY = targetY;
  37. }
  38. public AreaData(int areaId, float targetX, float targetY, ENTER_TYPE enterType)
  39. {
  40. this.prop = MapConfigCategory.Instance.Get(areaId);
  41. this.areaId = areaId;
  42. this.targetX = targetX;
  43. this.targetY = targetY;
  44. this.enterType = enterType;
  45. }
  46. public AreaData(int areaId, long instanceId, ENTER_TYPE enterType)
  47. {
  48. this.prop = MapConfigCategory.Instance.Get(areaId);
  49. this.areaId = areaId;
  50. this.instanceId = instanceId;
  51. this.enterType = enterType;
  52. }
  53. }
  54. }