public override void Serialize(XmlDocument document, XmlElement localRoot) { localRoot.SetAttribute("id", Data.ShortName); if (Data.HouseWall) { localRoot.SetAttribute("reversed", Reversed.ToString().ToLower()); } }
public override string ToString() { var sb = new StringBuilder("SliceRange("); if ((Start != null)) { sb.Append(", Start: "); Start.ToString(sb); } if ((Finish != null)) { sb.Append(", Finish: "); Finish.ToString(sb); } sb.Append(", Reversed: "); Reversed.ToString(sb); sb.Append(", Count: "); Count.ToString(sb); sb.Append(')'); return(sb.ToString()); }
public void Calibrate() { GameObject DataManager = GameObject.Find("DataManager"); int Cal_x, Cal_y, Cal_z; bool Reversed; if (DataManager != null) { Cal_x = DataManager.GetComponent <DataManager>().cal_x; Cal_y = DataManager.GetComponent <DataManager>().cal_y; Cal_z = DataManager.GetComponent <DataManager>().cal_z; Reversed = DataManager.GetComponent <DataManager>().XZ_Reversed; } else { Cal_x = 1; Cal_y = 1; Cal_z = 1; Reversed = false; } string msg = "CAL|" + Cal_x.ToString() + '%' + Cal_y.ToString() + '%' + Cal_z.ToString() + '%' + Reversed.ToString() + '%' + '|'; Send(msg, ReliableChannel, clients); }