Ejemplo n.º 1
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);
    }
Ejemplo n.º 2
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);
    }
Ejemplo n.º 3
0
 private void processSlowInput()
 {
     if (!m_canSlow)
     {
         return;
     }
     if (Input.GetKeyDown("space"))
     {
         if (ScaledTime.GetScale(true) == 0.0f)
         {
             RHManager.SetPause(false);
         }
         else if (ScaledTime.GetScale(true) == 1.0f)
         {
             RHManager.SetSlowTextActive(true);
             ScaledTime.SetScale(0.5f, true);
         }
         else
         {
             RHManager.SetSlowTextActive(false);
             ScaledTime.SetScale(1.0f, true);
         }
     }
 }