Пример #1
0
 public void Deserialize(EntityPropsProp entity_props, JObject root)
 {
     entity_props.invulnerable = root["invulnerable"].GetBool();
     entity_props.m_no_chunk   = root["m_no_chunk"].GetBool();
     entity_props.index        = root["index"].GetInt();
     if (root["m_hp"].IsValid())
     {
         entity_props.m_hp = root["m_hp"].GetFloat();
     }
 }
Пример #2
0
 // PROP
 public void Serialize(EntityPropsProp entity_props, JObject root)
 {
     root["invulnerable"] = entity_props.invulnerable.ToString();
     root["m_no_chunk"]   = entity_props.m_no_chunk.ToString();
     root["index"]        = entity_props.index.ToString();
     if (entity_props.m_hp.HasValue)
     {
         root["m_hp"] = entity_props.m_hp.ToString();
     }
 }