Add() public method

Adds an object to the collection so that it can be referenced by its ID number.
public Add ( IWwiseObject obj ) : void
obj IWwiseObject The IWwiseObject to store.
return void
Ejemplo n.º 1
0
        private void ReadFileTable(EndianReader reader)
        {
            int fileCount = reader.ReadInt32();

            // Read each file and sort it into its folder
            for (int i = 0; i < fileCount; i++)
            {
                SoundPackFile file = new SoundPackFile(this, reader);

                // Put the file into its parent folder
                SoundPackFolder folder = FindFolderByID(file.FolderID);
                if (folder != null)
                {
                    folder.AddFile(file);
                }

                // Associate its ID
                _filesById[file.ID] = file;
                _objects.Add(file);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Registers a bank-less object (e.g. one from soundstream.pck) with the scanner.
 /// </summary>
 /// <param name="obj">The object to register.</param>
 public void RegisterGlobalObject(IWwiseObject obj)
 {
     _globalObjects.Add(obj);
 }