Room.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System.Collections.Generic;
  2. namespace ET
  3. {
  4. [ChildOf]
  5. [ComponentOf]
  6. public class Room: Entity, IScene, IAwake, IUpdate
  7. {
  8. public SceneType SceneType { get; set; } = SceneType.Room;
  9. public string Name { get; set; }
  10. public long StartTime { get; set; }
  11. // 帧缓存
  12. public FrameBuffer FrameBuffer { get; set; }
  13. // 计算fixedTime,fixedTime在客户端是动态调整的,会做时间膨胀缩放
  14. public FixedTimeCounter FixedTimeCounter { get; set; }
  15. // 玩家id列表
  16. public List<long> PlayerIds { get; } = new(LSConstValue.MatchCount);
  17. // 预测帧
  18. public int PredictionFrame { get; set; } = -1;
  19. // 权威帧
  20. public int AuthorityFrame { get; set; } = -1;
  21. // 存档
  22. public Replay Replay { get; set; } = new();
  23. private EntityRef<LSWorld> lsWorld;
  24. // LSWorld做成child,可以有多个lsWorld,比如守望先锋有两个
  25. public LSWorld LSWorld
  26. {
  27. get
  28. {
  29. return this.lsWorld;
  30. }
  31. set
  32. {
  33. this.AddChild(value);
  34. this.lsWorld = value;
  35. }
  36. }
  37. public bool IsReplay { get; set; }
  38. public int SpeedMultiply { get; set; }
  39. }
  40. }