Exemple #1
0
    /**
     * Called when the player quits a trigger zone
     *@param collider - trigger zone collider
     */
    void OnTriggerExit(Collider collider)
    {
        // is view disabled?
        if (!Enabled)
        {
            return;
        }

        // get back the previous sounds to play
        OnGetSounds?.Invoke(this, "prev_ambient_sound", m_SoundController);
    }
Exemple #2
0
    /**
     * Called when the player enters in a trigger zone
     *@param collider - trigger zone collider
     */
    void OnTriggerEnter(Collider collider)
    {
        // is view disabled?
        if (!Enabled)
        {
            return;
        }

        // get the sounds to play matching with the trigger zone
        OnGetSounds?.Invoke(this, collider.name, m_SoundController);
    }