Exemple #1
0
        public PDModule(int id, PDEditorModule editorModule, PDAudioItemManager itemManager, PDPlayer pdPlayer)
            : base(editorModule.Name, id, itemManager, pdPlayer)
        {
            this.Volume      = editorModule.Volume;
            this.spatializer = new PDSpatializer(editorModule, pdPlayer);
            this.pdPlayer    = pdPlayer;

            Initialize();
        }
Exemple #2
0
    public override void OnInspectorGUI()
    {
        pdPlayer              = (PDPlayer)target;
        editorHelper          = pdPlayer.editorHelper;
        editorHelperProperty  = serializedObject.FindProperty("editorHelper");
        modulesProperty       = editorHelperProperty.FindPropertyRelative("modules");
        defaultModule         = editorHelper.defaultModule;
        defaultModuleProperty = editorHelperProperty.FindPropertyRelative("defaultModule");

        Begin();

        ShowGeneralSettings();
        Separator();
        ShowDefaultSettings();
        Separator();
        ShowModules();
        End();
    }
Exemple #3
0
    void ShowModules()
    {
        if (LargeAddElementButton(modulesProperty, new GUIContent("Add New Module")))
        {
            editorHelper.modules[editorHelper.modules.Count - 1] = new PDEditorModule("", defaultModule, pdPlayer);
            editorHelper.modules[editorHelper.modules.Count - 1].SetUniqueName("default", editorHelper.modules);
        }

        for (int i = 0; i < editorHelper.modules.Count; i++)
        {
            currentModule         = editorHelper.modules[i];
            currentModuleProperty = modulesProperty.GetArrayElementAtIndex(i);

            BeginBox();
            if (DeleteElementFoldOutWithArrows(modulesProperty, i, new GUIContent(currentModule.Name, "Sets specific settings for a module."), GetStateColorStyle()))
            {
                break;
            }

            ShowModule();
            EndBox();
        }
    }