示例#1
0
            public static HIRCObject Create(SerializingContainer2 sc)
            {
                HIRCType type = (HIRCType)(sc.Game == MEGame.ME3 ? sc.ms.ReadByte() : (byte)sc.ms.ReadInt32());
                int      len  = sc.ms.ReadInt32();
                uint     id   = sc.ms.ReadUInt32();

                return(type switch
                {
                    HIRCType.SoundSXFSoundVoice => SoundSFXVoice.Create(sc, id, len),
                    HIRCType.Event => Event.Create(sc, id),
                    HIRCType.EventAction => EventAction.Create(sc, id, len),
                    _ => new HIRCObject
                    {
                        Type = type,
                        ID = id,
                        unparsed = sc.ms.ReadBytes(len - 4)
                    }
                });