Ejemplo n.º 1
0
 public void WriteData(MyData.Writer writer)
 {
     writer.Int(Level, "level");
     writer.Collection(ExitedUnitIDs, "exitedUnitIDs",
                       (MyData.Writer wr, ulong val, string name) =>
                       wr.UInt64(val, name));
 }
Ejemplo n.º 2
0
        public virtual void WriteData(MyData.Writer writer)
        {
            writer.UInt64(ID, "id");

            writer.Int(TurnPriority, "turnPriority");

            writer.Collection(UnitsByID, "units",
                              (MyData.Writer w, ulong outVal, string name) =>
                              w.UInt64(outVal, name));

            writer.Collection(AlliesByID, "allies",
                              (MyData.Writer w, ulong outVal, string name) =>
                              w.UInt64(outVal, name));
            writer.Collection(EnemiesByID, "enemies",
                              (MyData.Writer w, ulong outVal, string name) =>
                              w.UInt64(outVal, name));
        }
Ejemplo n.º 3
0
 public void WriteData(MyData.Writer writer)
 {
     writer.Structure(Tiles, "tiles");
     writer.UInt64(nextID, "nextID");
     writer.Structure(Groups, "groups");
     writer.Collection <Unit, HashSet <Unit> >(units, "units",
                                               (wr, unit, name) =>
                                               Unit.Write(wr, name, unit));
 }
Ejemplo n.º 4
0
        //Serialization stuff:

        public void WriteData(MyData.Writer writer)
        {
            writer.Int(NIterations, "nIterations");
            writer.Float(TileVariation, "tileVariation");

            KeyframeSerializer kfs = new KeyframeSerializer();

            writer.Collection(
                TileChangeChances.keys, "tileChangeChances",
                (MyData.Writer w, Keyframe k, string name) =>
                { kfs.Kf = k; w.Structure(kfs, name); });
        }