Exemplo n.º 1
0
    public void Toggle()
    {
        IsOpen = !IsOpen;

        openGraphics.SetActive(IsOpen);
        closedGraphics.SetActive(!IsOpen);

        doorCollisionObject.SetActive(!IsOpen);

        Promaja.Refresh();

        if (IsOpen)
        {
            if (openClip)
            {
                openClip.Play2D(0.5f);
            }
        }
        else
        {
            if (closeClip)
            {
                closeClip.Play2D(0.5f);
            }
        }

        if (mixer)
        {
            mixer.SetFloat("City Lowpass", IsOpen ? 13000 : 200);
            mixer.SetFloat("City Volume", IsOpen ? 0 : -5);
        }
    }
Exemplo n.º 2
0
    public void Toggle()
    {
        IsProzorOpen = !IsProzorOpen;

        openGraphics.SetActive(IsProzorOpen);
        closedGraphics.SetActive(!IsProzorOpen);

        Promaja.Refresh();

        if (IsOpen)
        {
            pickupClip?.Play2D(soundVolume);
        }
        else
        {
            putClip?.Play2D(soundVolume);
        }
    }