예제 #1
0
        public void Encode(General.Encoding.BinaryOutput stream)
        {
            stream.Write(Name);
            stream.Write(Actions.Count);
            ActionIO writer = new ActionIO(stream);

            foreach (IAction i in Actions)
            {
                writer.Write(i);
            }
        }
예제 #2
0
        public IEncodable Decode(General.Encoding.BinaryInput stream)
        {
            name = stream.ReadString();
            int      c      = stream.ReadInt32();
            ActionIO reader = new ActionIO(stream);

            for (int i = 0; i < c; i++)
            {
                Actions.Add(reader.Read());
            }

            return(this);
        }