public static bool Read(this ViStringIStream IS, out LogicAuraProperty value) { value = default(LogicAuraProperty); if (IS.Read(out value.SpellID) == false) { return(false); } if (IS.Read(out value.EffectIdx) == false) { return(false); } if (IS.Read(out value.EndTime) == false) { return(false); } if (IS.Read(out value.CastorValue) == false) { return(false); } if (IS.Read(out value.Value) == false) { return(false); } return(true); }
public static bool Read(this ViStringIStream IS, out List <string> list) { ViArrayIdx size; IS.Read(out size); list = new List <string>((int)size); for (ViArrayIdx idx = 0; idx < size; ++idx) { string value; if (IS.Read(out value) == false) { return(false); } list.Add(value); } return(true); }
public static bool Read(this ViStringIStream IS, out ViVector3 value) { value = ViVector3.ZERO; if (IS.Read(out value.x) == false) { return(false); } if (IS.Read(out value.y) == false) { return(false); } if (IS.Read(out value.z) == false) { return(false); } return(true); }
public static bool Read <TEntity>(ViStringIStream IS, out TEntity value) where TEntity : ViEntity { value = default(TEntity); ViEntityID ID; if (IS.Read(out ID) == false) { return(false); } value = EntityNameger.GetEntity <TEntity>(ID); return(true); }
public static bool Read(this ViStringIStream IS, out LogicAuraValueArray value) { value = default(LogicAuraValueArray); if (IS.Read(out value.Element0) == false) { return(false); } if (IS.Read(out value.Element1) == false) { return(false); } if (IS.Read(out value.Element2) == false) { return(false); } if (IS.Read(out value.Element3) == false) { return(false); } return(true); }
public static bool Read(this ViStringIStream IS, out List <LogicAuraProperty> list) { list = null; ViArrayIdx size; if (IS.Read(out size) == false) { return(false); } list = new List <LogicAuraProperty>((int)size); for (ViArrayIdx idx = 0; idx < size; ++idx) { LogicAuraProperty value; if (IS.Read(out value) == false) { return(false); } list.Add(value); } return(true); }
static bool ReadInt32Field(ViStringIStream IS, FieldInfo field, ref object data) { Int32 value; if (IS.Read(out value)) { field.SetValue(data, value); return(true); } else { return(false); } }
static bool ReadStructInt32Field(ViStringIStream IS, FieldInfo field, ref object data) { object obj = field.GetValue(data); FieldInfo[] fieldList = obj.GetType().GetFields(BindingFlag); ViDebuger.AssertError(fieldList.Length == 1); Int32 value; if (IS.Read(out value)) { fieldList[0].SetValue(obj, value); field.SetValue(data, obj); return(true); } else { return(false); } }
public static bool Read <TEntity>(ViStringIStream IS, out List <TEntity> list) where TEntity : ViEntity { list = null; ViArrayIdx size; if (IS.Read(out size) == false) { return(false); } list = new List <TEntity>(); for (ViArrayIdx idx = 0; idx < size; ++idx) { TEntity value; if (Read(IS, out value)) { return(false); } list.Add(value); } return(true); }