Bricklayer.Common.Entities.Player.Player C# (CSharp) Метод

Player() публичный Метод

Creates a new base of a player
public Player ( Map map, Vector2 position, string name, int id ) : System
map Bricklayer.Common.World.Map
position Vector2
name string
id int
Результат System
        public Player(Map map, Vector2 position, string name, int id)
        {
            Map = map;
            Smiley = SmileyType.Default;
            Mode = PlayerMode.Normal;
            Tint = Color.White;

            SimulationState = new EntityState();
            DisplayState = new EntityState();
            PreviousState = new EntityState();

            SimulationState.Position = PreviousState.Position = DisplayState.Position = position;

            if (id > byte.MaxValue)
                throw new ArgumentOutOfRangeException("id", id, "The player ID must be within range of a single byte.");
            ID = (byte)id;
            Username = name;

            Index = map.Players.Count;
        }
Player