NetPlayer
namespace Griff.Runtime;
public sealed class NetPlayerSomeone in a network game: the host, or a player who joined. Every machine has the same list.
Properties
Section titled “Properties”Avatar
Section titled “Avatar”public Entity? Avatar { get; }The character they play as (see Player), if they have one in this scene.
public Color Color { get; }The color that marks them (their team’s, in a team game).
public int Id { get; }A number for this player, the same on every machine. The host’s own player is 1.
public IInput? Input { get; }The keys, mouse and gamepad of a player on another machine, as the host has them, or null for this machine’s player (see Input).
IsHost
Section titled “IsHost”public bool IsHost { get; }True for the host’s own player.
IsLocal
Section titled “IsLocal”public bool IsLocal { get; }True for the player playing on this machine.
public string Name { get; }public int Ping { get; }Milliseconds their connection to the host takes there and back (0 for the host).
public int Score { get; }Points, e.g. one per opponent defeated (see ScoreKills). The host keeps the score.
public string Team { get; }Their team’s name, from Teams; empty when there are no teams.
Methods
Section titled “Methods”ToString
Section titled “ToString”public override string ToString()