Exemplo n.º 1
0
            internal override Region ReadEntry(BinaryReaderEx br)
            {
                RegionType type = br.GetEnum8 <RegionType>(br.Position + br.VarintSize + 2);

                switch (type)
                {
                case RegionType.Region0:
                    return(Region0s.EchoAdd(new Region.Region0(br)));

                case RegionType.Light:
                    return(Lights.EchoAdd(new Region.Light(br)));

                case RegionType.StartPoint:
                    return(StartPoints.EchoAdd(new Region.StartPoint(br)));

                case RegionType.Sound:
                    return(Sounds.EchoAdd(new Region.Sound(br)));

                case RegionType.SFX:
                    return(SFXs.EchoAdd(new Region.SFX(br)));

                case RegionType.Wind:
                    return(Winds.EchoAdd(new Region.Wind(br)));

                case RegionType.EnvLight:
                    return(EnvLights.EchoAdd(new Region.EnvLight(br)));

                case RegionType.Fog:
                    return(Fogs.EchoAdd(new Region.Fog(br)));

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