Exemplo n.º 1
0
 private void RunLuaCommand()
 {
     if (string.IsNullOrEmpty(m_input))
     {
         return;
     }
     try
     {
         Lua.Result result = Lua.Run(m_input, DialogueDebug.logInfo);
         m_output = "Output: " + GetLuaResultString(result);
     }
     catch (Exception e)
     {
         m_output = "Output: [Exception] " + e.Message;
     }
     m_history.Add(m_input);
     if (m_history.Count >= maxHistory)
     {
         m_history.RemoveAt(0);
     }
     m_historyPosition = m_history.Count;
     m_input           = string.Empty;
 }