public override void Deserialize(ByteStreamReader reader) { base.Deserialize(reader); m_who = reader.ReadInt(); m_direction = reader.ReadVector2(); m_point = reader.ReadVector2(); }
public override void Deserialize(ByteStreamReader reader) { m_sessionId = reader.ReadInt(); m_actuallySpawned = reader.ReadBool(); if (m_actuallySpawned) { m_startPosition = reader.ReadVector2(); } }
public bool Deserialize(ByteStreamReader reader) { id = reader.ReadInt(); int changeMask = reader.ReadByte(); bool changedPosition = (changeMask & maskOfPositionChange) != 0, changedHealth = (changeMask & maskOfHealthChange) != 0; if (changedHealth) { power = reader.ReadFloat(); Console.WriteLine("Applying health: " + power); } if (changedPosition) { position = reader.ReadVector2(); Console.WriteLine("Applying position: " + position); } return(true); }
public override void Deserialize(ByteStreamReader reader) { m_direction = reader.ReadVector2(); m_sessionId = reader.ReadInt(); }