/// <summary> /// </summary> /// <param name="other"></param> public BioStateEventElementSubstate(BioStateEventElementSubstate other) : base(other) { GlobalBool = other.GlobalBool; NewState = other.NewState; ParentIndex = other.ParentIndex; ParentTypeOr = other.ParentTypeOr; SiblingIndices = other.SiblingIndices ?? new List<int>(); UseParam = other.UseParam; }
/// <summary> /// </summary> /// <param name="other"></param> public BioStateEventElementSubstate(BioStateEventElementSubstate other) : base(other) { GlobalBool = other.GlobalBool; NewState = other.NewState; ParentIndex = other.ParentIndex; ParentTypeOr = other.ParentTypeOr; SiblingIndices = other.SiblingIndices ?? new List <int>(); UseParam = other.UseParam; }
public void Write(BioStateEventElementSubstate element) { WriteEventElement(element); Write(element.GlobalBool); Write(element.NewState.ToInt32()); Write(element.UseParam.ToInt32()); Write(element.ParentTypeOr.ToInt32()); Write(element.ParentIndex); Write(element.SiblingIndices.Count); foreach (var index in element.SiblingIndices) { Write(index); } }
public BioStateEventElementSubstate ReadEventElementSubstate() { var element = new BioStateEventElementSubstate(); ReadBioStateEventElement(element); element.GlobalBool = ReadInt32(); element.NewState = ReadInt32().ToBoolean(); element.UseParam = ReadInt32().ToBoolean(); element.ParentTypeOr = ReadInt32().ToBoolean(); element.ParentIndex = ReadInt32(); var siblingIndicesCount = ReadInt32(); element.SiblingIndices = new List <int>(); for (var i = 0; i < siblingIndicesCount; i++) { element.SiblingIndices.Add(ReadInt32()); } return(element); }
public BioStateEventElementSubstate ReadEventElementSubstate() { var element = new BioStateEventElementSubstate(); ReadBioStateEventElement(element); element.GlobalBool = ReadInt32(); element.NewState = ReadInt32().ToBoolean(); element.UseParam = ReadInt32().ToBoolean(); element.ParentTypeOr = ReadInt32().ToBoolean(); element.ParentIndex = ReadInt32(); var siblingIndicesCount = ReadInt32(); element.SiblingIndices = new List<int>(); for (var i = 0; i < siblingIndicesCount; i++) { element.SiblingIndices.Add(ReadInt32()); } return element; }