_asdf
This commit is contained in:
@@ -84,21 +84,21 @@ public class PlayerInput2 : IPlayerInput
|
||||
public class PlayerInputNetwork2 : IPlayerInput
|
||||
{
|
||||
private uint _playerId;
|
||||
private WorldStateManager _worldStateManager;
|
||||
private World _world;
|
||||
private ulong _frame;
|
||||
private PlayerInputState2 _state;
|
||||
|
||||
public PlayerInputNetwork2(uint playerId, WorldStateManager worldStateManager)
|
||||
public PlayerInputNetwork2(uint playerId, World world)
|
||||
{
|
||||
_playerId = playerId;
|
||||
_worldStateManager = worldStateManager;
|
||||
_world = world;
|
||||
}
|
||||
|
||||
public void SetFrame(ulong frame) => _frame = frame;
|
||||
|
||||
public void UpdateState()
|
||||
{
|
||||
_worldStateManager.GetPlayerInputState(_playerId, _frame, out _state);
|
||||
_world.GetPlayerInputState(_playerId, _frame, out _state);
|
||||
}
|
||||
|
||||
public PlayerInputState2 GetState() => _state;
|
||||
@@ -107,4 +107,15 @@ public class PlayerInputNetwork2 : IPlayerInput
|
||||
{
|
||||
_state = new PlayerInputState2();
|
||||
}
|
||||
}
|
||||
|
||||
public class PlayerInputNone : IPlayerInput
|
||||
{
|
||||
public static PlayerInputNone Instance { get; } = new PlayerInputNone();
|
||||
private PlayerInputNone() { }
|
||||
|
||||
public PlayerInputState2 GetState() => default;
|
||||
public void ResetState() { }
|
||||
public void SetFrame(ulong frame) { }
|
||||
public void UpdateState() { }
|
||||
}
|
||||
Reference in New Issue
Block a user