예제 #1
0
            internal override Event ReadEntry(BinaryReaderEx br)
            {
                EventType type = br.GetEnum8 <EventType>(br.Position + br.VarintSize + 4);

                switch (type)
                {
                case EventType.Light:
                    return(Lights.EchoAdd(new Event.Light(br)));

                case EventType.Shadow:
                    return(Shadows.EchoAdd(new Event.Shadow(br)));

                case EventType.Fog:
                    return(Fogs.EchoAdd(new Event.Fog(br)));

                case EventType.BGColor:
                    return(BGColors.EchoAdd(new Event.BGColor(br)));

                case EventType.MapOffset:
                    return(MapOffsets.EchoAdd(new Event.MapOffset(br)));

                case EventType.Warp:
                    return(Warps.EchoAdd(new Event.Warp(br)));

                case EventType.CheapMode:
                    return(CheapModes.EchoAdd(new Event.CheapMode(br)));

                default:
                    throw new NotImplementedException($"Unimplemented event type: {type}");
                }
            }