public ClientPlayer(ClientLogic clientLogic, ClientPlayerManager manager, string name, byte id) : base(manager, name, id) { _clientLogic = clientLogic; playerManager = manager; _predictionPlayerStates = new LiteRingBuffer <PlayerInputPacket>(MaxStoredCommands); PlayerName = name; PlayerCombat = new ClientPlayerCombat(this); SubscribePacketListener(); }
public ClientPacketHandler(ClientLogic clientLogic, NetPacketProcessor packetProcessor, ClientPlayerManager playerManager) { Instance = this; _writer = new NetDataWriter(); _clientLogic = clientLogic; _packetProcessor = packetProcessor; _playerManager = playerManager; SetListeners(); }
public ClientPlayer(ClientLogic clientLogic, ClientPlayerManager manager, string name, byte id) : base(manager, name, id) { _playerManager = manager; _predictionPlayerStates = new LiteRingBuffer <PlayerInputPacket>(MaxStoredCommands); _clientLogic = clientLogic; _predictionPlayerStates.FastClear(); _predictionPlayerStates.Add(new PlayerInputPacket { Id = 0 }); }
public ClientPlayerManager(ClientLogic clientLogic) { _clientLogic = clientLogic; _players = new Dictionary <byte, PlayerHandler>(); }