mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
[+] 接入ET8服务端
[+] 接入ET8服务端
This commit is contained in:
53
Assets/GameScripts/DotNet/Model/Share/LockStep/Room.cs
Normal file
53
Assets/GameScripts/DotNet/Model/Share/LockStep/Room.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ET
|
||||
{
|
||||
[ChildOf]
|
||||
[ComponentOf]
|
||||
public class Room: Entity, IScene, IAwake, IUpdate
|
||||
{
|
||||
public Fiber Fiber { get; set; }
|
||||
public SceneType SceneType { get; set; } = SceneType.Room;
|
||||
public string Name { get; set; }
|
||||
|
||||
public long StartTime { get; set; }
|
||||
|
||||
// 帧缓存
|
||||
public FrameBuffer FrameBuffer { get; set; }
|
||||
|
||||
// 计算fixedTime,fixedTime在客户端是动态调整的,会做时间膨胀缩放
|
||||
public FixedTimeCounter FixedTimeCounter { get; set; }
|
||||
|
||||
// 玩家id列表
|
||||
public List<long> PlayerIds { get; } = new(LSConstValue.MatchCount);
|
||||
|
||||
// 预测帧
|
||||
public int PredictionFrame { get; set; } = -1;
|
||||
|
||||
// 权威帧
|
||||
public int AuthorityFrame { get; set; } = -1;
|
||||
|
||||
// 存档
|
||||
public Replay Replay { get; set; } = new();
|
||||
|
||||
private EntityRef<LSWorld> lsWorld;
|
||||
|
||||
// LSWorld做成child,可以有多个lsWorld,比如守望先锋有两个
|
||||
public LSWorld LSWorld
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.lsWorld;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.AddChild(value);
|
||||
this.lsWorld = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsReplay { get; set; }
|
||||
|
||||
public int SpeedMultiply { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user