Map.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System.Collections.Generic;
  2. using Newtonsoft.Json.Linq;
  3. namespace ET.Server
  4. {
  5. /// <summary>
  6. /// 游戏场景实体
  7. /// </summary>
  8. [ChildOf(typeof(GameMapComponent))]
  9. public class Map: Entity, IAwake<JObject>, IDestroy
  10. {
  11. /** 地图id **/
  12. public int MapId { get; set; }
  13. /** 场景玩法类型 **/
  14. public int Type { get; set; }
  15. /** 场景配置 **/
  16. public MapConfig Prop { get; set; }
  17. /** 战斗服id **/
  18. public string BattleServerId { get; set; }
  19. /** 游戏服id **/
  20. public int LogicServerId { get; set; }
  21. /** 副本创建时间 **/
  22. public long createTime { get; set; }
  23. /** 场景里的角色(主播) [key:playerId, value:主播玩家实体] **/
  24. [StaticField]
  25. public Dictionary<long, WNPlayer> Players = new Dictionary<long, WNPlayer>();
  26. /** 场景里的单位玩家 [key:openId, value:模板id] **/
  27. public Dictionary<string, int> UnitPlayers { get; set; }
  28. /** 场景中单位玩家objId列表 [key:openId, value:战斗服objId] **/
  29. public Dictionary<string, int> UnitObjIds { get; set; }
  30. /** 场景中单位玩家点赞数 [key:openId, value:点赞数] **/
  31. public Dictionary<string, int> UnitPlayerLikes { get; set; }
  32. /** 死亡的单位(塔) **/
  33. [StaticField]
  34. public List<int> DeadUnits = new List<int>();
  35. /** 游戏结束标记 **/
  36. [StaticField]
  37. public bool IsGameOver = false;
  38. }
  39. }