Esempio n. 1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        VacuumSound script = (VacuumSound)target;

        if (GUILayout.Button("Start Engine"))
        {
            if (Application.isPlaying)
            {
                script.StartEngine();
            }
        }

        if (GUILayout.Button("Stop Engine"))
        {
            if (Application.isPlaying)
            {
                script.StopEngine();
            }
        }

        if (GUI.changed)
        {
            EditorUtility.SetDirty(vacuumSound);
        }

        serializedVacuumSound.ApplyModifiedProperties();
    }
Esempio n. 2
0
    public void MuteCommonSounds()
    {
        string busString = "Bus:/UsualSounds";

        FMOD.Studio.Bus bus;
        bus = RuntimeManager.GetBus(busString);
        bus.setFaderLevel(0f);
        ambientSound.GetComponent <FMODUnity.StudioEventEmitter>().Stop();
        vaccuumSound.StopEngine();
        Debug.Log("MUTE");
    }
Esempio n. 3
0
 private void UpdateDustSuckerStatus(bool status)
 {
     dustSuckerActive = status;
     if (dustSuckerActive)
     {
         sound.StartEngine();
     }
     else
     {
         sound.StopEngine();
     }
 }
Esempio n. 4
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        VacuumSound script = (VacuumSound)target;

        if (GUILayout.Button("Start Engine"))
        {
            script.StartEngine();
        }

        if (GUILayout.Button("Stop Engine"))
        {
            script.StopEngine();
        }
    }