예제 #1
0
	public void Pack(DataPacker packer)
	{
		packer.Pack(this.VariableID);
		packer.Pack((byte)this.Operator);
		if (this.VariableID != HamTimeline.InvalidID)
		{
			this.Operand.Pack(packer);
		}
	}
예제 #2
0
	public void Pack(DataPacker packer)
	{
		packer.Pack(this.VariableID);
		packer.Pack((byte)this.Comparison);
		if (this.VariableID != HamTimeline.InvalidID)
		{
			this.CompareValue.Pack(packer);
		}
		packer.Pack(this.NextNodeID);
	}
예제 #3
0
	public static void Pack(HamTimelineNode node, DataPacker packer)
	{
		packer.Pack((byte)node.Type);
		packer.Pack(node.ID);

		packer.Pack(node.PreviousNodeIDs.Count);
		for (int i = 0; i < node.PreviousNodeIDs.Count; ++i)
		{
			packer.Pack(node.PreviousNodeIDs[i]);
		}

		node.Pack(packer);
	}
예제 #4
0
	public void Pack(DataPacker packer)
	{
		packer.Pack((int)Version.Original);
		packer.Pack(this.Name);
		packer.Pack(this.IDCount);
		packer.Pack(this.OriginNodeID);
		packer.Pack(this.NarratorID);
		packer.Pack(this.DefaultSceneID);

		packer.Pack(this.Variables.Count);
		foreach (HamTimelineVariable variable in this.Variables.Values)
		{
			variable.Pack(packer);
		}

		packer.Pack(this.Scenes.Count);
		foreach (HamScene scene in this.Scenes.Values)
		{
			scene.Pack(packer);
		}

		packer.Pack(this.Characters.Count);
		foreach (HamCharacter character in this.Characters.Values)
		{
			character.Pack(packer);
		}

		packer.Pack(this.Nodes.Count);
		foreach (HamTimelineNode node in this.Nodes.Values)
		{
			HamTimelineNode.Pack(node, packer);
		}
	}
예제 #5
0
	public void Pack(DataPacker packer)
	{
		this.timeline.Pack(packer);
		packer.Pack(this.variables.Count);
		foreach (int key in this.variables.Keys)
		{
			packer.Pack(key);
			this.variables[key].Pack(packer);
		}
		packer.Pack(this.currentNodeID);
		packer.Pack(this.currentSceneID);
		packer.Pack(this.currentCharactersInScene.Count);
		for (int i = 0; i < this.currentCharactersInScene.Count; ++i)
		{
			packer.Pack(this.currentCharactersInScene[i]);
		}
		packer.Pack(this.nodeHistory.Count);
		for (int i = 0; i < this.nodeHistory.Count; ++i)
		{
			packer.Pack(this.nodeHistory[i]);
		}
	}
 // private methods...
 byte[] PackData(DataPacker packer, byte[] data)
 {
     return(packer.Pack(data));
 }
예제 #7
0
	public void Pack(DataPacker packer)
	{
		packer.Pack(this.ID);
		packer.Pack(this.Name);
	}
예제 #8
0
	public override void Pack(DataPacker packer)
	{
		packer.Pack(this.NextNodeID);
		packer.Pack(this.Operations.Count);
		for (int i = 0; i < this.Operations.Count; ++i)
		{
			this.Operations[i].Pack(packer);
		}
	}
예제 #9
0
	public override void Pack(DataPacker packer)
	{
		packer.Pack(this.Decisions.Count);
		for (int i = 0; i < this.Decisions.Count; ++i)
		{
			this.Decisions[i].Pack(packer);
		}
	}
예제 #10
0
		public void Pack(DataPacker packer)
		{
			packer.Pack(this.DecisionText);
			packer.Pack(this.IsDialog);

			packer.Pack(this.Predicates.Count);
			for (int i = 0; i < this.Predicates.Count; ++i)
			{
				this.Predicates[i].Pack(packer);
			}

			packer.Pack(this.NextNodeID);
		}
예제 #11
0
	public override void Pack(DataPacker packer)
	{
		packer.Pack(this.DefaultNextID);
		packer.Pack(this.Predicates.Count);
		for (int i = 0; i < this.Predicates.Count; ++i)
		{
			this.Predicates[i].Pack(packer);
		}
	}
예제 #12
0
	public override void Pack(DataPacker packer)
	{
		packer.Pack(this.SceneID);

		packer.Pack(this.CharacterIDs.Count);
		for (int i = 0; i < this.CharacterIDs.Count; ++i)
		{
			packer.Pack(this.CharacterIDs[i]);
		}

		packer.Pack(this.SpeakerID);
		packer.Pack(this.Dialog);
		packer.Pack(this.NextNodeID);
	}