Ejemplo n.º 1
0
 public override void OnEnter()
 {
     if ((asset1 != null) && (asset2 != null) && (statusValue != null))
     {
         try {
             Lua.Run(string.Format("SetStatus({0}, {1}, \"{2}\")",
                                   asset1.Value.Replace("\"", "'").Replace(" ", "_").Replace("-", "_"),
                                   asset2.Value.Replace("\"", "'").Replace(" ", "_").Replace("-", "_"),
                                   DialogueLua.DoubleQuotesToSingle(statusValue.Value)), DialogueDebug.LogInfo);
         } catch (System.NullReferenceException) {
         }
     }
     Finish();
 }
Ejemplo n.º 2
0
 public override void OnEnter()
 {
     if ((asset1 != null) && (asset2 != null) && (storeResult != null))
     {
         try {
             storeResult.Value = Lua.Run(string.Format("return GetStatus({0}, {1})",
                                                       DialogueLua.SpacesToUnderscores(DialogueLua.DoubleQuotesToSingle(asset1.Value)),
                                                       DialogueLua.SpacesToUnderscores(DialogueLua.DoubleQuotesToSingle(asset2.Value))), DialogueDebug.LogInfo).AsString;
         } catch (System.NullReferenceException) {
         }
     }
     Finish();
 }
 /// <summary>
 /// When the text field UI calls our OnAcceptedText delegate, record the value into the Lua variable and
 /// stop this sequence.
 /// </summary>
 /// <param name="text">Text.</param>
 public void OnAcceptedText(string text)
 {
     if (!acceptedText)
     {
         Lua.Run(string.Format("Variable[\"{0}\"] = \"{1}\"", new System.Object[] { variableName, DialogueLua.DoubleQuotesToSingle(text) }));
     }
     acceptedText = true;
     Stop();
 }