Exemple #1
0
 /// <inheritdoc />
 public IPlayer CreatePlayer(int playerid, IPlayerPool.RemoveEntityDelegate removeEntity)
 {
     return(new Player(
                playerid,
                removeEntity,
                this.sampNatives,
                this.playersNatives));
 }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Player"/> class.
        /// </summary>
        /// <param name="id">The id of this player.</param>
        /// <param name="entityRemoval">Pool removal delgate.</param>
        /// <param name="sampNatives">General samp natives needed for this entity.</param>
        /// <param name="playersNatives">Natives needed for this entity.</param>
        public Player(
            int id,
            IPlayerPool.RemoveEntityDelegate entityRemoval,
            ISampNatives sampNatives,
            IPlayersNatives playersNatives)
            : base(id)
        {
            this.entityRemoval  = entityRemoval;
            this.sampNatives    = sampNatives;
            this.playersNatives = playersNatives;

            this.Principal = new ClaimsPrincipal();
        }