private void SerializeID(ushort id) { bigIndex = (id / 8); smallIndex = (id % 8); Header.Set(bigIndex, true); Data.EnsureCapacity(bigIndex + 1); Data[bigIndex] |= (byte)(1 << smallIndex); }
private void SerializeAgent(LSAgent agent) { if (leAgentController == null) { leAgentController = agent.Controller; } bigIndex = (agent.LocalID / 8); smallIndex = (agent.LocalID % 8); Header.Set(bigIndex, true); Data.EnsureCapacity(bigIndex + 1); Data[bigIndex] |= (byte)(1 << smallIndex); selectedAgentLocalIDs.Add(agent.LocalID); }