Exemple #1
0
        public new static DlmSoundElement ReadFromStream(DlmCell cell, IDataReader reader)
        {
            var element = new DlmSoundElement(cell);

            element.m_soundId              = reader.ReadInt();
            element.m_baseVolume           = reader.ReadShort();
            element.m_fullVolumedistance   = reader.ReadInt();
            element.m_nullVolumedistance   = reader.ReadInt();
            element.m_minDelayBetweenloops = reader.ReadShort();
            element.m_maxDelayBetweenloops = reader.ReadShort();

            return(element);
        }
Exemple #2
0
        public static DlmBasicElement ReadFromStream(DlmCell cell, IDataReader reader)
        {
            var type = reader.ReadByte();

            switch ((ElementTypesEnum)type)
            {
            case ElementTypesEnum.Graphical:
                return(DlmGraphicalElement.ReadFromStream(cell, reader));

            case ElementTypesEnum.Sound:
                return(DlmSoundElement.ReadFromStream(cell, reader));

            default:
                throw new Exception("Unknown element ID : " + type + " CellID : " + cell.Id);
            }
        }