コード例 #1
0
 /// <summary> Writes the contents of this AICCollection into the stream in ASCII text encoding.</summary>
 public void Write(Stream stream)
 {
     using (AIWriter aiw = new AIWriter(stream))
     {
         foreach (AICharacter c in this.Values)
         {
             aiw.Write(c);
             aiw.WriteLine();
         }
     }
 }
コード例 #2
0
        /// <summary> Writes the contents of this AICCollection into the stream in ASCII text encoding.</summary>
        public void Write(Stream stream)
        {
            using (AIWriter aiw = new AIWriter(stream))
            {
                aiw.Write(header);
                aiw.WriteLine();

                aiw.OpenCommentSec();
                aiw.WriteInfo(typeof(AICharacter));
                aiw.CloseCommentSec();
                aiw.WriteLine();

                foreach (AICharacter c in this.Values.OrderBy(c => c.Index))
                {
                    aiw.Write(c);
                    aiw.WriteLine();
                }
            }
        }
コード例 #3
0
        static void WriteString(AIWriter w, string name, object o)
        {
            string input = (string)o;

            if (!input.Contains('\n'))
            {
                WriteDefault(w, name, o);
                return;
            }

            w.WriteLine(name);
            w.OpenSec();

            string[] lines = input.Split(lineBreakArr, StringSplitOptions.None);
            foreach (string line in lines)
            {
                w.WriteLine(line);
            }

            w.CloseSec();
        }
コード例 #4
0
 static void WriteDefault(AIWriter w, string name, object o)
 {
     w.WriteLine(string.Format("{0}\t= {1}", name, o));
 }