internal override Event ReadEntry(BinaryReaderEx br) { EventType type = br.GetEnum32 <EventType>(br.Position + 0xC); switch (type) { case EventType.Treasure: var treasure = new Event.Treasure(br); Treasures.Add(treasure); return(treasure); case EventType.Generator: var generator = new Event.Generator(br); Generators.Add(generator); return(generator); case EventType.ObjAct: var objAct = new Event.ObjAct(br); ObjActs.Add(objAct); return(objAct); case EventType.MapOffset: var mapOffset = new Event.MapOffset(br); MapOffsets.Add(mapOffset); return(mapOffset); case EventType.PseudoMultiplayer: var invasion = new Event.PseudoMultiplayer(br); PseudoMultiplayers.Add(invasion); return(invasion); case EventType.WalkRoute: var walkRoute = new Event.WalkRoute(br); WalkRoutes.Add(walkRoute); return(walkRoute); case EventType.GroupTour: var groupTour = new Event.GroupTour(br); GroupTours.Add(groupTour); return(groupTour); case EventType.Other: var other = new Event.Other(br); Others.Add(other); return(other); default: throw new NotImplementedException($"Unsupported event type: {type}"); } }
internal override Event ReadEntry(BinaryReaderEx br) { EventType type = br.GetEnum32 <EventType>(br.Position + 0xC); switch (type) { case EventType.Treasure: var treasure = new Event.Treasure(br); Treasures.Add(treasure); return(treasure); case EventType.Generator: var generator = new Event.Generator(br); Generators.Add(generator); return(generator); case EventType.ObjAct: var objAct = new Event.ObjAct(br); ObjActs.Add(objAct); return(objAct); case EventType.MapOffset: var mapOffset = new Event.MapOffset(br); MapOffsets.Add(mapOffset); return(mapOffset); case EventType.WalkRoute: var walkRoute = new Event.WalkRoute(br); WalkRoutes.Add(walkRoute); return(walkRoute); case EventType.GroupTour: var groupTour = new Event.GroupTour(br); GroupTours.Add(groupTour); return(groupTour); case EventType.Event17: var event17 = new Event.Event17(br); Event17s.Add(event17); return(event17); case EventType.Event18: var event18 = new Event.Event18(br); Event18s.Add(event18); return(event18); case EventType.Event20: var event20 = new Event.Event20(br); Event20s.Add(event20); return(event20); case EventType.Event21: var event21 = new Event.Event21(br); Event21s.Add(event21); return(event21); case EventType.PartsGroup: var partsGroup = new Event.PartsGroup(br); PartsGroups.Add(partsGroup); return(partsGroup); case EventType.Event23: var event23 = new Event.Event23(br); Event23s.Add(event23); return(event23); case EventType.AutoDrawGroup: var autoDrawGroup = new Event.AutoDrawGroup(br); AutoDrawGroups.Add(autoDrawGroup); return(autoDrawGroup); case EventType.Other: var other = new Event.Other(br); Others.Add(other); return(other); default: throw new NotImplementedException($"Unimplemented model type: {type}"); } }
internal override Event ReadEntry(BinaryReaderEx br) { EventType type = br.GetEnum32 <EventType>(br.Position + 8); switch (type) { case EventType.Light: var light = new Event.Light(br); Lights.Add(light); return(light); case EventType.Sound: var sound = new Event.Sound(br); Sounds.Add(sound); return(sound); case EventType.SFX: var sfx = new Event.SFX(br); SFXs.Add(sfx); return(sfx); case EventType.WindSFX: var windSFX = new Event.WindSFX(br); WindSFXs.Add(windSFX); return(windSFX); case EventType.Treasure: var treasure = new Event.Treasure(br); Treasures.Add(treasure); return(treasure); case EventType.Generator: var generator = new Event.Generator(br); Generators.Add(generator); return(generator); case EventType.Message: var message = new Event.Message(br); Messages.Add(message); return(message); case EventType.ObjAct: var objAct = new Event.ObjAct(br); ObjActs.Add(objAct); return(objAct); case EventType.SpawnPoint: var spawnPoint = new Event.SpawnPoint(br); SpawnPoints.Add(spawnPoint); return(spawnPoint); case EventType.MapOffset: var mapOffset = new Event.MapOffset(br); MapOffsets.Add(mapOffset); return(mapOffset); case EventType.Navmesh: var navmesh = new Event.Navmesh(br); Navmeshes.Add(navmesh); return(navmesh); case EventType.Environment: var environment = new Event.Environment(br); Environments.Add(environment); return(environment); case EventType.PseudoMultiplayer: var pseudoMultiplayer = new Event.PseudoMultiplayer(br); PseudoMultiplayers.Add(pseudoMultiplayer); return(pseudoMultiplayer); default: throw new NotImplementedException($"Unsupported event type: {type}"); } }