コード例 #1
0
        public Stream toStream()
        {
            Stream stream = new MemoryStream();

            Bar.Entry MotionEntry = new Bar.Entry();
            MotionEntry.Type   = Bar.EntryType.Motion;
            MotionEntry.Index  = MotionIndex;
            MotionEntry.Name   = MotionName;
            MotionEntry.Stream = MotionFile.toStream();

            Bar.Entry TriggerEntry = new Bar.Entry();
            TriggerEntry.Type   = Bar.EntryType.MotionTriggers;
            TriggerEntry.Index  = TriggerIndex;
            TriggerEntry.Name   = TriggerName;
            TriggerEntry.Stream = (MotionTriggerFile != null) ? MotionTriggerFile.toStream() : new MemoryStream();

            Bar.Write(stream, new List <Bar.Entry> {
                MotionEntry, TriggerEntry
            });

            stream.Position = 0;
            return(stream);
        }
コード例 #2
0
ファイル: MotionSet.cs プロジェクト: tommadness/OpenKh
 private static bool ContainsAnimation(Bar.Entry entry) =>
 entry.Stream.Length > 0;