Exemplo 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();
    }
Exemplo 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");
    }
Exemplo n.º 3
0
 private void UpdateDustSuckerStatus(bool status)
 {
     dustSuckerActive = status;
     if (dustSuckerActive)
     {
         sound.StartEngine();
     }
     else
     {
         sound.StopEngine();
     }
 }
Exemplo 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();
        }
    }