예제 #1
0
        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();
        }
예제 #2
0
        public ClientPacketHandler(ClientLogic clientLogic, NetPacketProcessor packetProcessor, ClientPlayerManager playerManager)
        {
            Instance = this;

            _writer          = new NetDataWriter();
            _clientLogic     = clientLogic;
            _packetProcessor = packetProcessor;
            _playerManager   = playerManager;

            SetListeners();
        }
예제 #3
0
        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>();
 }