Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public static RemoveObject Parse(BinaryReader reader)
        {
            var removeObject = new RemoveObject();

            removeObject.Depth = reader.ReadInt32();
            return(removeObject);
        }