Beispiel #1
0
 public void SkipToNextStatment()
 {
     if (m_currentStatement != null)
     {
         ScaledTime.skipTime(m_nextStatementEnd - ScaledTime.UITimeElapsed, true);
     }
 }
Beispiel #2
0
 void Awake()
 {
     if (m_instance == null)
     {
         m_instance = this;
     }
     else if (m_instance != this)
     {
         Destroy(gameObject);
         return;
     }
 }
Beispiel #3
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);
    }
Beispiel #4
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);
    }
Beispiel #5
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);
    }
Beispiel #6
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);
         }
     }
 }
Beispiel #7
0
 public static void SetPause(bool isPaused)
 {
     m_instance.m_PauseText.gameObject.SetActive(isPaused);
     ScaledTime.SetPause(isPaused, true);
 }
Beispiel #8
0
 private void startActiveBattle()
 {
     ScaledTime.SetPause(false, true);
 }