protected bool WriteStateUpdatePacket(int objNum, bool shotLight, int potionNum, bool hasParent, ref State cubeState) { writeStream.Start(packetBuffer); bool result = true; try { packetSerializer.WriteHeader(writeStream, 00000000, objNum, shotLight, potionNum, hasParent, cubeState); writeStream.Finish(); } catch (Network.SerializeException) { Debug.Log("error: failed to write state update packet packet"); result = false; } return(result); }