public static SequenceLine Create(EdNode root) { SequenceLine sequenceLine = new SequenceLine(); sequenceLine.Id = root.GetAttribute(Id).ToInt(); List <EdNode> nodes = root.GetNodes(Track); int length = nodes.Count; for (int i = 0; i < length; i++) { EdNode node = nodes[i]; bool result = AddLeafNodes(sequenceLine, node); if (!result) { return(null); } } return(sequenceLine); }
private static bool AddLeafNodes(SequenceLine sequenceLine, EdNode trackNode) { int startFarme = trackNode.GetAttribute(StartFrame).ToInt(); int frameLength = trackNode.GetAttribute(FrameLength).ToInt(); TrackLine trackLine = CreateTrack(startFarme, frameLength); sequenceLine.AddTrack(trackLine); List <EdNode> nodes = trackNode.Nodes; int length = nodes.Count; for (int i = 0; i < length; i++) { EdNode node = nodes[i]; SequenceLeafNode leafNode = CreateLeftNode(node); if (leafNode == null) { return(false); } trackLine.AddNode(leafNode); } return(true); }
public static SequenceLine Create() { SequenceLine line = new SequenceLine(); TrackLine track1 = CreateTrack(0, 30 * 3); line.AddTrack(track1); //1.移动到指定地点 //1.1 播放移动动画 //1.2 位移偏移 SequenceLeafNode node1 = SequenceFactory.CreateNode(SequenceFactory.PLAY_POSITION_TARGET_LEAF_NODE, null); (node1 as PlayPositionTargetLeafNode)._bbTarget = SequenceSelfConst.TARGET_POSITION1; track1.AddNode(node1); TrackLine track2 = CreateTrack(30 * 3, 30 * 3); line.AddTrack(track2); SequenceLeafNode node2 = SequenceFactory.CreateNode(SequenceFactory.PLAY_ANIMATION_LEAF_NODE, null); track2.AddNode(node2); TrackLine track3 = CreateTrack(30 * 6, 30 * 3); line.AddTrack(track3); SequenceLeafNode node3 = SequenceFactory.CreateNode(SequenceFactory.PLAY_POSITION_TARGET_LEAF_NODE, null); (node3 as PlayPositionTargetLeafNode)._bbTarget = SequenceSelfConst.TARGET_POSITION2; track3.AddNode(node3); line.CalEnd(); return(line); }
public void BindingContext(SequenceLine context) { _context = context; }
public SequenceLine Create() { SequenceLine line = new SequenceLine(); return(line); }