Room.cs 1.4 KB

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