Exemplo n.º 1
0
        public void LoadFromStream(BinaryReader r)
        {
            Int32 version = r.ReadInt32();

            Debug.Assert(version == 1);

            Int32 events_count = r.ReadInt32();

            events = new AGSInteractionCommandsList[events_count];

            Int32[] types = new Int32[events.Length];
            for (int i = 0; i < events.Length; ++i)
            {
                types[i] = r.ReadInt32();
            }

            event_responses = r.ReadArrayInt32(events.Length);
            for (int i = 0; i < event_responses.Length; ++i)
            {
                events[i] = null;

                if (event_responses[i] == 0)
                {
                    continue;
                }

                events[i] = new AGSInteractionCommandsList();
                events[i].LoadFromStream(r);
                events[i].type = types[i];
            }
        }
 public AGSInteractionCommand()
 {
     args     = new AGSInteractionValue[MAX_ACTION_ARGS];
     type     = 0;
     children = null;
     parent   = null;
 }
        public void LoadFromStream(BinaryReader r)
        {
            Int32 vtable = r.ReadInt32();

            type = r.ReadInt32();

            for (int i = 0; i < args.Length; ++i)
            {
                args[i] = new AGSInteractionValue();
                args[i].LoadFromStream(r);
            }

            children = r.ReadInt32() == 0 ? null : new AGSInteractionCommandsList();
            parent   = r.ReadInt32() == 0 ? null : new AGSInteractionCommandsList();
        }