public override void Stream(SaveStream stream) { base.Stream(stream); mNPCIdentity.Stream(stream); stream.Stream(ref mStartingPosition); stream.Stream(ref mRelaxedPosition); }
public void Stream(SaveStream stream) { if (stream.IsWriting()) { Debug.Assert(InitialRooms.IsValidInitialRoomIndex(mInitialRoomIndex)); stream.Stream(ref mInitialRoomIndex); } else { InitialRooms.ID roomIndex = InitialRooms.ID.Unknown; stream.Stream(ref roomIndex); SetInitialRoomIndex(roomIndex); LoadStaticGridFromInitialRoom(); } int dynamicObjectCount = mDynamicObjects.Count; stream.Stream(ref dynamicObjectCount, SaveUtils.GetNumBitsToStoreValue(maxNumDynamicObjects)); if (stream.IsWriting()) { foreach (DynamicObject dynamicObject in mDynamicObjects) { dynamicObject.Stream(stream); } } else { mDynamicObjects.Clear(); for (int dynamicObjectIndex = 0; dynamicObjectIndex < dynamicObjectCount; dynamicObjectIndex++) { DynamicObject dynamicObject = (DynamicObject)Emoji.CreateObject(stream as ReadStream); dynamicObject.Stream(stream); mDynamicObjects.Add(dynamicObject); } } }
public void Stream(SaveStream stream) { int numEntries = mEntries.Count; stream.Stream(ref numEntries, SaveUtils.GetNumBitsToStoreValue(maxInventorySize)); if (stream.IsWriting()) { foreach (InventoryEntry entry in mEntries) { entry.Stream(stream); } } else { for (int entryIndex = 0; entryIndex < numEntries; entryIndex++) { InventoryEntry entry = new InventoryEntry(); entry.Stream(stream); mEntries.Add(entry); } } }
private void Stream(SaveStream stream) { if (!stream.IsWriting()) { NPCIdentifier.currentMaxID = 0; } mInventory.Stream(stream); mRoom.Stream(stream); mGameTime.Stream(stream); int numNPCData = mNPCIdentities.Count; stream.Stream(ref numNPCData, SaveUtils.GetNumBitsToStoreValue(NPCIdentifier.maxNumNPCs)); if (stream.IsWriting()) { foreach (KeyValuePair <int, NPCIdentityData> pair in mNPCIdentities) { int id = pair.Key; stream.Stream(ref id, SaveUtils.GetNumBitsToStoreValue(NPCIdentifier.maxNumNPCs - 1)); pair.Value.Stream(stream); } } else { mNPCIdentities.Clear(); for (int npcIdentityIndex = 0; npcIdentityIndex < numNPCData; npcIdentityIndex++) { int id = 0; NPCIdentityData data = new NPCIdentityData(); stream.Stream(ref id, SaveUtils.GetNumBitsToStoreValue(NPCIdentifier.maxNumNPCs - 1)); data.Stream(stream); mNPCIdentities[id] = data; } } }
public override void Stream(SaveStream stream) { stream.Stream(ref mType); stream.Stream(ref mPosition); }
public void Stream(SaveStream stream) { stream.Stream(ref mId, SaveUtils.GetNumBitsToStoreValue(maxNumNPCs)); }
public void Stream(SaveStream stream) { stream.Stream(ref mSkinToneIndex, SaveUtils.GetNumBitsToStoreValue(StringUtils.GetNumSkinToneVariations() - 1)); stream.Stream(ref mGenderIndex, SaveUtils.GetNumBitsToStoreValue(StringUtils.GetNumGenderVariations() - 1)); }
public override void Stream(SaveStream stream) { base.Stream(stream); stream.Stream(ref mIsMovingTowardsFlower); }
public override void Stream(SaveStream stream) { base.Stream(stream); mIdentifier.Stream(stream); }
public override void Stream(SaveStream stream) { stream.Stream(ref mTimeLeft, 2); }
public void Stream(SaveStream stream) { stream.Stream(ref mType); }
public void Stream(SaveStream stream) { stream.Stream(ref mTimeInHoursAfterMidnight, SaveUtils.GetNumBitsToStoreValue(23)); }
public override void Stream(SaveStream stream) { base.Stream(stream); stream.Stream(ref mIsWalkingRight); }