Beispiel #1
0
 public override void OnEnter()
 {
     if (PlayMakerTools.IsValueAssigned(element) && PlayMakerTools.IsValueAssigned(field))
     {
         string tableName = PlayMakerTools.LuaTableName(table);
         if ((stringValue != null) && !stringValue.IsNone)
         {
             DialogueLua.SetTableField(tableName, element.Value, field.Value, stringValue.Value);
         }
         if ((floatValue != null) && !floatValue.IsNone)
         {
             DialogueLua.SetTableField(tableName, element.Value, field.Value, floatValue.Value);
         }
         if ((intValue != null) && !intValue.IsNone)
         {
             DialogueLua.SetTableField(tableName, element.Value, field.Value, intValue.Value);
         }
         if ((boolValue != null) && !boolValue.IsNone)
         {
             DialogueLua.SetTableField(tableName, element.Value, field.Value, boolValue.Value);
         }
     }
     else
     {
         LogWarning(string.Format("{0}: Element and Field must be assigned first.", DialogueDebug.Prefix));
     }
     Finish();
 }
Beispiel #2
0
 public override void OnEnter()
 {
     if (PlayMakerTools.IsValueAssigned(element) && PlayMakerTools.IsValueAssigned(field))
     {
         string     tableName = PlayMakerTools.LuaTableName(table);
         Lua.Result luaResult = DialogueLua.GetTableField(tableName, element.Value, field.Value);
         if (storeStringResult != null)
         {
             storeStringResult.Value = luaResult.AsString;
         }
         if (storeFloatResult != null)
         {
             storeFloatResult.Value = luaResult.AsFloat;
         }
         if (storeBoolResult != null)
         {
             storeBoolResult.Value = luaResult.AsBool;
         }
     }
     else
     {
         LogWarning(string.Format("{0}: Element and Field must be assigned first.", DialogueDebug.Prefix));
     }
     Finish();
 }
Beispiel #3
0
 private void GetAndStore()
 {
     if (PlayMakerTools.IsValueAssigned(element) && PlayMakerTools.IsValueAssigned(field))
     {
         string     tableName = PlayMakerTools.LuaTableName(table);
         Lua.Result luaResult = (getLocalizedVersion != null && getLocalizedVersion.Value == true)
             ? DialogueLua.GetLocalizedTableField(tableName, element.Value, field.Value)
             : DialogueLua.GetTableField(tableName, element.Value, field.Value);
         if (storeStringResult != null)
         {
             storeStringResult.Value = luaResult.AsString;
         }
         if (storeFloatResult != null)
         {
             storeFloatResult.Value = luaResult.AsFloat;
         }
         if (storeIntResult != null)
         {
             storeIntResult.Value = luaResult.AsInt;
         }
         if (storeBoolResult != null)
         {
             storeBoolResult.Value = luaResult.AsBool;
         }
     }
     else
     {
         LogWarning(string.Format("{0}: Element and Field must be assigned first.", DialogueDebug.Prefix));
     }
 }