public void Load(BinaryFormatter formatter, FileStream stream) { selected = (bool)formatter.Deserialize(stream); choosingTobacco = (bool)formatter.Deserialize(stream); carryingHookah = (bool)formatter.Deserialize(stream); bool hasCurrentAction = (bool)formatter.Deserialize(stream); //if (hasCurrentAction) //{ //currentAction = (Action)formatter.Deserialize(stream); //currentAction.started = false; //} actions.Clear(); int actionsCount = (int)formatter.Deserialize(stream); if (actionsCount != 0) { for (int i = 0; i < actionsCount; i++) { Action action = (Action)formatter.Deserialize(stream); actions.Enqueue(action); } } SerializedTransform serializedTransform = (SerializedTransform)formatter.Deserialize(stream); TransformDeserializer.Deserialize(serializedTransform, transform); }
public void Load(BinaryFormatter formatter, FileStream stream) { Occupied = (bool)formatter.Deserialize(stream); Reserved = (bool)formatter.Deserialize(stream); SerializedTransform serializedTransform = (SerializedTransform)formatter.Deserialize(stream); TransformDeserializer.Deserialize(serializedTransform, transform); }
public void Load(BinaryFormatter formatter, FileStream stream) { currentPrefs = (ClientPrefs)formatter.Deserialize(stream); waitingTime = (float)formatter.Deserialize(stream); prefsSatisfied = (bool)formatter.Deserialize(stream); Status = (ClientStatus)formatter.Deserialize(stream); SerializedTransform serializedTransform = (SerializedTransform)formatter.Deserialize(stream); TransformDeserializer.Deserialize(serializedTransform, transform); }
public void Load(BinaryFormatter formatter, FileStream stream) { Occupied = (bool)formatter.Deserialize(stream); Active = (bool)formatter.Deserialize(stream); maxSmokingTime = (float)formatter.Deserialize(stream); smokingTimeLeft = (float)formatter.Deserialize(stream); bool containsTobacco = (bool)formatter.Deserialize(stream); if (containsTobacco) { ContainedTobacco = (Tobacco)formatter.Deserialize(stream); } SerializedTransform serializedTransform = (SerializedTransform)formatter.Deserialize(stream); TransformDeserializer.Deserialize(serializedTransform, transform); }