public static void SetLogicLong(LogicJSONObject jsonObject, string key, LogicLong value) { if (value != null) { LogicJSONHelper.SetInt(jsonObject, key + "_hi", value.GetHigherInt()); LogicJSONHelper.SetInt(jsonObject, key + "_lo", value.GetLowerInt()); } }
public static string GetString(LogicJSONObject jsonObject, string key) { return(LogicJSONHelper.GetString(jsonObject, key, string.Empty, true)); }
public static int GetInt(LogicJSONObject jsonObject, string key, int defaultValue) { return(LogicJSONHelper.GetInt(jsonObject, key, defaultValue, false)); }
public static int GetInt(LogicJSONObject jsonObject, string key) { return(LogicJSONHelper.GetInt(jsonObject, key, -1, true)); }
public static LogicLong GetLogicLong(LogicJSONObject jsonObject, string key) { return(new LogicLong(LogicJSONHelper.GetInt(jsonObject, key + "_hi"), LogicJSONHelper.GetInt(jsonObject, key + "_lo"))); }
public static LogicDeliverable GetLogicDeliverable(LogicJSONObject jsonObject) { LogicDeliverable deliverable = LogicDeliverableFactory.CreateByType(LogicStringUtil.ConvertToInt(LogicJSONHelper.GetString(jsonObject, "type"))); deliverable.ReadFromJSON(jsonObject); return(deliverable); }
public static LogicData GetLogicData(LogicJSONObject jsonObject, string key) { LogicData data = LogicDataTables.GetDataById(LogicStringUtil.ConvertToInt(LogicJSONHelper.GetString(jsonObject, key, string.Empty, true))); if (data == null) { Debugger.Error("Unable to load data. key:" + key); } return(data); }