public void UpdateState(KnownClientState state) { this.ReadyForGame = state == KnownClientState.Ready; this.Status = state == KnownClientState.Free ? string.Empty : state.ToString(); PropertyChanged(this, new PropertyChangedEventArgs("Status")); PropertyChanged(this, new PropertyChangedEventArgs("ReadyForGame")); }
private void StateChangedHandler(SBRemoteClient source, KnownClientState st) { this.SendToAll(new MsgKnownClientStateUpdate() { Id = source.Id, State = st }); }
public void SetState(KnownClientState state) { if ((state == KnownClientState.Free && this.State == KnownClientState.InGame) || (state == KnownClientState.InGame && (this.State == KnownClientState.Free || this.State == KnownClientState.Ready))) { OnStateChanged(this.State = state); } }
private void SetStateInternal(KnownClientState state) { if ((state == KnownClientState.Ready && this.State == KnownClientState.Free) || (state == KnownClientState.Free && this.State == KnownClientState.Ready)) { OnStateChanged(this.State = state); } }
public PlayerInfo(Guid id, string name, KnownClientState state) { this.Id = id; this.Name = name; this.UpdateState(state); }