示例#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 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
            });
        }