Esempio n. 1
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);
    }
Esempio n. 2
0
    public void CloseConversation()
    {
        RHManager.UITime().SetActive(false);
        RHManager.UITime().GetComponent <RHUITime>().ClearItems();
        RHManager.ClearHistory();
        RHManager.SetHistoryTextActive(false);
        RHManager.SetResourceUIInActive();
        RHManager.FinishBox.gameObject.SetActive(false);

        m_isFinished = true;
        if (m_currentDialogueBox != null)
        {
            Destroy(m_currentDialogueBox);
        }
        if (m_destroyAfterFinish)
        {
            Destroy(gameObject);
        }
        ScaledTime.SetPause(false, true);
        ScaledTime.SetScale(1f);
    }
Esempio n. 3
0
    public void StartRhetoricBattle(List <RHSpeaker> participants, RHSpeaker startingSpeaker)
    {
        if (participants.Count == 0)
        {
            Debug.LogError("Conversation attempted with 0 participants");
            return;
        }

        ScaledTime.SetPause(true, true);
        m_nextStatementEnd      = ScaledTime.UITimeElapsed;
        m_nextInterestTimeLimit = ScaledTime.UITimeElapsed + m_startingInterest;
        RHManager.UITime().SetActive(true);
        m_timeUI = RHManager.UITime().GetComponent <RHUITime>();
        m_timeUI.StartUI(this);

        m_queue = new RHQueue();
        ScaledTime.SetScale(0f);
        m_lastScaled = ScaledTime.UITimeElapsed;

        this.m_listeners_with_scores = new Dictionary <RHListener, float>();
        this.m_listeners             = new List <RHListener>();
        this.m_speakers = new List <RHSpeaker>();

        m_speakerColorMaps = new Dictionary <RHSpeaker, Color>();
        int colorIndex = 0;

        m_startingSpeaker = startingSpeaker;
        foreach (RHSpeaker s in participants)
        {
            initializeSpeaker(s, colorIndex, startingSpeaker);
            colorIndex = (colorIndex + 1) % m_defaultColors.Count;
        }
        RefreshStatementMenu(m_startingSpeaker);
        m_previousStatements = new List <RHStatement>();
        RHManager.ClearHistory();
        RHManager.SetHistoryTextActive(true);
        RHManager.AddHistoryText(m_introText);
    }
Esempio n. 4
0
 public static void SetPause(bool isPaused)
 {
     m_instance.m_PauseText.gameObject.SetActive(isPaused);
     ScaledTime.SetPause(isPaused, true);
 }
Esempio n. 5
0
 private void startActiveBattle()
 {
     ScaledTime.SetPause(false, true);
 }