Exemple #1
0
        public static FrameItem Create(BinaryReader reader)
        {
            FrameItem frameItem = null;

            var type = reader.ReadUInt32AsEnum <FrameItemType>();

            switch (type)
            {
            case FrameItemType.Action:
                frameItem = Action.Parse(reader);
                break;

            case FrameItemType.FrameLabel:
                frameItem = FrameLabel.Parse(reader);
                break;

            case FrameItemType.PlaceObject:
                frameItem = PlaceObject.Parse(reader);
                break;

            case FrameItemType.RemoveObject:
                frameItem = RemoveObject.Parse(reader);
                break;

            case FrameItemType.BackgroundColor:
                frameItem = BackgroundColor.Parse(reader);
                break;

            case FrameItemType.InitAction:
                frameItem = InitAction.Parse(reader);
                break;
            }

            return(frameItem);
        }
Exemple #2
0
        public static FrameLabel Parse(BinaryReader reader)
        {
            var label = new FrameLabel();

            label.Name    = reader.ReadStringAtOffset();
            label.Flags   = reader.ReadUInt32();
            label.FrameId = reader.ReadUInt32();
            return(label);
        }