예제 #1
0
 protected virtual void OnConversationFailure(RHListener listener, RHUIFinishWindow uif)
 {
     foreach (RHFinishEffect rfe in m_failEffects)
     {
         uif.AddListenerResult(rfe.ExecuteFinishEffect(m_startingSpeaker, listener));
     }
 }
예제 #2
0
    private void OnFinish()
    {
        RHUIFinishWindow finWin = RHManager.FinishBox.GetComponent <RHUIFinishWindow>();

        RHManager.FinishBox.gameObject.SetActive(true);
        bool success = true;

        foreach (RHListener listener in m_listeners)
        {
            success = success && processFinish(listener, finWin);
        }
        finWin.SetConversation(this, success);
        ScaledTime.SetPause(true, true);
    }
예제 #3
0
    protected virtual bool processFinish(RHListener listener, RHUIFinishWindow uif)
    {
        foreach (RHSpeaker s in m_speakers)
        {
            Dictionary <RHStat, float> d = listener.GetDifferenceStats(s);
            foreach (RHStat stat in d.Keys)
            {
                listener.ModifyStat(s, this, stat, d[stat] * m_statRetainAmount, true);
            }
            listener.ClearTempStats(s);
        }

        if (m_listeners_with_scores[listener] > m_threashould)
        {
            OnConversationSuccess(listener, uif);
            return(true);
        }
        else
        {
            OnConversationFailure(listener, uif);
            return(false);
        }
    }