public CommandImplementation(GameState game, NetBuffer buffer) { this.game = game; var time = new Instant(buffer.ReadDouble()); this.game.SetTime(time); int count = buffer.ReadByte(); this.parameters = new List<SingleParameters>(count); for (int i = 0; i < count; i++) { this.parameters.Add(buffer.Read<SingleParameters>()); } }
public ParameterGroup(NetBuffer buffer) { this.id = buffer.Read<Id>().Generic<Player>(); int count = buffer.ReadByte(); this.values = new List<ValueParameters>(count); for (int i = 0; i < count; i++) { this.values.Add(buffer.Read<ValueParameters>()); } }