// SCRIPT public void Serialize(EntityPropsScript entity_props, JObject root) { for (int i = 0; i < EntityPropsScript.MAX_LINKS; i++) { root["entity_link" + i.ToString()] = entity_props.entity_link[i].ToString(); } root["delay"] = entity_props.delay.ToString(); root["show_message"] = entity_props.show_message.ToString(); root["special_index"] = entity_props.special_index.ToString(); }
public void Deserialize(EntityPropsScript entity_props, JObject root) { for (int i = 0; i < EntityPropsScript.MAX_LINKS; i++) { entity_props.entity_link[i] = root["entity_link" + i.ToString()].GetEntityGuid(); #if OVERLOAD_LEVEL_EDITOR Utility.DebugLog("Script Deserialize " + root["entity_link" + i.ToString()] + " converted to " + entity_props.entity_link[i]); #endif } entity_props.delay = root["delay"].GetFloat(); entity_props.show_message = root["show_message"].GetBool(); entity_props.special_index = root["special_index"].GetInt(); }