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

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

                case EventType.Sound:
                    return(Sounds.EchoAdd(new Event.Sound(br)));

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

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

                case EventType.Treasure:
                    return(Treasures.EchoAdd(new Event.Treasure(br)));

                case EventType.Generator:
                    return(Generators.EchoAdd(new Event.Generator(br)));

                case EventType.Message:
                    return(Messages.EchoAdd(new Event.Message(br)));

                case EventType.ObjAct:
                    return(ObjActs.EchoAdd(new Event.ObjAct(br)));

                case EventType.SpawnPoint:
                    return(SpawnPoints.EchoAdd(new Event.SpawnPoint(br)));

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

                case EventType.Navmesh:
                    return(Navmeshes.EchoAdd(new Event.Navmesh(br)));

                case EventType.Environment:
                    return(Environments.EchoAdd(new Event.Environment(br)));

                case EventType.PseudoMultiplayer:
                    return(PseudoMultiplayers.EchoAdd(new Event.PseudoMultiplayer(br)));

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