public void Update(HEntityUpdate update) { if (!TryUpdate(update)) { throw new ArgumentException("Entity index does not match.", nameof(update)); } }
public static HEntityUpdate[] Parse(HMessage packet) { var updates = new HEntityUpdate[packet.ReadInteger()]; for (int i = 0; i < updates.Length; i++) { updates[i] = new HEntityUpdate(packet); } return(updates); }
public bool TryUpdate(HEntityUpdate update) { if (Index != update.Index) { return(false); } Tile = update.Tile; LastUpdate = update; return(true); }