public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); for (int i = 0; i < Joints.Length; i++) { j[i] = Compound.GetInt("J" + i.ToString()); } w1 = Compound.GetInt("W1"); w2 = Compound.GetInt("W2"); w3 = Compound.GetInt("W3"); w4 = Compound.GetInt("W4"); var l = Logics as Logics.TeslaCoilLogics; l.Range = (float)Compound.GetDouble("Range"); l.Capacitance = (float)Compound.GetDouble("Capacitance"); l.DischargeVoltage = (float)Compound.GetDouble("DischargeVoltage"); l.CurCharge = (float)Compound.GetDouble("Charge"); if (l.CurCharge < 0) { l.CurCharge = 0; } }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); c1 = Compound.GetInt("C1"); c2 = Compound.GetInt("C2"); }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); j0 = Compound.GetInt("J0"); j1 = Compound.GetInt("J1"); w = Compound.GetInt("W"); (Logics as Logics.PulseFormerLogics).cycle = Compound.GetBool("Cycle"); double td = Compound.GetDouble("MaxRes"); if (Double.IsNaN(td)) { td = MaxResistance; } MaxResistance = (float)td; String s = Compound.GetString("Pulses"); var a = s.Split(';'); float[] t = new float[a.Length]; for (int i = 0; i < a.Length; i++) { try { t[i] = (float)Convert.ToDouble(a[i]); } catch { t[i] = 0; } } (Logics as Logics.PulseFormerLogics).pulses = t; }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); j0 = Compound.GetInt("J0"); j1 = Compound.GetInt("J1"); w = Compound.GetInt("W"); }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); j0 = Compound.GetInt("J0"); j1 = Compound.GetInt("J1"); w = Compound.GetInt("W"); MaxResistance = Compound.GetDouble("MaxRes"); }
/// <summary> /// Called when a scheme is being loaded /// </summary> /// <param name="Compound">Use this to read data</param> public virtual void LoadAll(IO.ComponentData Compound) { ID = Compound.GetInt("ID"); Graphics.Position = Compound.GetVector2("Position"); Graphics.Size = Compound.GetVector2("Size"); Graphics.Visible = Compound.GetBool("Visible"); rotation = (Rotation)Compound.GetInt("Rotation"); isRemovable = Compound.GetBool("Removable"); }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); j0 = Compound.GetInt("J0"); j1 = Compound.GetInt("J1"); w = Compound.GetInt("W"); (Logics as Logics.PulseCoreLogics).RequiredActivity = Compound.GetInt("RequiredLength"); }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); fieldRadius = (float)Compound.GetDouble("Field"); pole = (MagnetPole)Compound.GetInt("Pole"); con = Compound.GetInt("Connector"); com = Compound.GetInt("ConComp"); }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); j0 = Compound.GetInt("J0"); j1 = Compound.GetInt("J1"); w = Compound.GetInt("W"); res = (float)Compound.GetDouble("Resistance"); }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); j0 = Compound.GetInt("J0"); j1 = Compound.GetInt("J1"); w = Compound.GetInt("W"); (Logics as Logics.PowerACLogics).voltage = Compound.GetDouble("Voltage"); (Logics as Logics.PowerACLogics).period = (float)Compound.GetDouble("Period"); }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); j0 = Compound.GetInt("J0"); j1 = Compound.GetInt("J1"); w = Compound.GetInt("W"); var a = Compound.GetDouble("Field"); if (!Double.IsNaN(a)) { fieldRadius = (float)a; } }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); j0 = Compound.GetInt("J0"); j1 = Compound.GetInt("J1"); w = Compound.GetInt("W"); var a = Compound.GetDouble("Luminosity"); if (!Double.IsNaN(a)) { Luminosity = (float)a; } }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); for (int i = 0; i < Joints.Length; i++) { j[i] = Compound.GetInt("J" + i.ToString()); } for (int i = 0; i < W.Length; i++) { w[i] = Compound.GetInt("W" + i.ToString()); } }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); j0 = Compound.GetInt("J0"); j1 = Compound.GetInt("J1"); j2 = Compound.GetInt("J2"); j3 = Compound.GetInt("J3"); j4 = Compound.GetInt("J4"); j5 = Compound.GetInt("J5"); w1 = Compound.GetInt("W1"); w2 = Compound.GetInt("W2"); w3 = Compound.GetInt("W3"); (Logics as Logics.SignalSplitterLogics).Period = Compound.GetInt("Period"); }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); for (int i = 0; i < Joints.Length; i++) { j[i] = Compound.GetInt("J" + i.ToString()); } for (int i = 0; i < Wires.Length; i++) { w[i] = Compound.GetInt("W" + i.ToString()); } sw = Compound.GetBool("Swapped"); OrigSwapped = Compound.GetBool("OrigSwapped"); }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); j0 = Compound.GetInt("J0"); j1 = Compound.GetInt("J1"); w = Compound.GetInt("W"); String s = Compound.GetString("Target"); (Logics as Logics.CoreLogics).Load(s); double acc = Compound.GetDouble("Accuracy"); if (!Double.IsNaN(acc)) { (Logics as Logics.CoreLogics).RequiredAccuracy = (float)acc; } }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); j0 = Compound.GetInt("J0"); j1 = Compound.GetInt("J1"); j2 = Compound.GetInt("J2"); j3 = Compound.GetInt("J3"); j4 = Compound.GetInt("J4"); j5 = Compound.GetInt("J5"); w1 = Compound.GetInt("W1"); w2 = Compound.GetInt("W2"); w3 = Compound.GetInt("W3"); }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); j0 = Compound.GetInt("J0"); j1 = Compound.GetInt("J1"); j2 = Compound.GetInt("J2"); j3 = Compound.GetInt("J3"); w1 = Compound.GetInt("W1"); w2 = Compound.GetInt("W2"); (Logics as Logics.AccumulatorLogics).Charge = Compound.GetInt("Charge"); (Logics as Logics.AccumulatorLogics).StartCharge = Compound.GetInt("StartCharge"); (Logics as Logics.AccumulatorLogics).MaxCharge = Compound.GetInt("MaxCharge"); }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); for (int i = 0; i < Joints.Length; i++) { j[i] = Compound.GetInt("J" + i.ToString()); } for (int i = 0; i < Wires.Length; i++) { w[i] = Compound.GetInt("W" + i.ToString()); } connectedLeft = Compound.GetBool("Left"); connectedUp = Compound.GetBool("Up"); connectedRight = Compound.GetBool("Right"); connectedDown = Compound.GetBool("Down"); leftUp = Compound.GetBool("LeftUp"); leftRight = Compound.GetBool("LeftRight"); leftDown = Compound.GetBool("LeftDown"); upRight = Compound.GetBool("UpRight"); upDown = Compound.GetBool("UpDown"); rightDown = Compound.GetBool("RightDown"); left = (PortState)Compound.GetInt("PortLeft"); up = (PortState)Compound.GetInt("PortUp"); right = (PortState)Compound.GetInt("PortRight"); down = (PortState)Compound.GetInt("PortDown"); }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); j0 = Compound.GetInt("J0"); j1 = Compound.GetInt("J1"); j2 = Compound.GetInt("J2"); j3 = Compound.GetInt("J3"); w1 = Compound.GetInt("W1"); w2 = Compound.GetInt("W2"); (Logics as Logics.DelayerLogics).Delay = Compound.GetInt("Delay"); }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); if (ID == 45) { } j1 = Compound.GetInt("J1"); j2 = Compound.GetInt("J2"); Resistance = Compound.GetDouble("Resistance"); IsConnected = Compound.GetBool("IsConnected"); direction = (WireDirection)Compound.GetInt("Direction"); if (Compound.Contains("SendingVoltage")) { sendingVoltage = Compound.GetDouble("SendingVoltage"); sendingCurrent = Compound.GetDouble("SendingCurrent"); CanSendVoltageOrCurrent = Compound.GetBool("CanSendVoltage"); } dp = Compound.GetString("DrawPath"); }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); for (int i = 0; i < Joints.Length; i++) { j[i] = Compound.GetInt("J" + i.ToString()); } var d = Compound.GetDouble("Current"); if (!Double.IsNaN(d)) { MaxCurrent = d; MaxVoltage = Compound.GetDouble("Potential"); MaxMagnetForce = (float)Compound.GetDouble("Force"); } }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); j0 = Compound.GetInt("J0"); j1 = Compound.GetInt("J1"); w1 = Compound.GetInt("W"); (Logics as Logics.VoltageGraphLogics).min = Compound.GetInt("Min"); (Logics as Logics.VoltageGraphLogics).max = Compound.GetInt("Max"); (Logics as Logics.VoltageGraphLogics).frequency = Compound.GetInt("Frequency"); }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); j0 = Compound.GetInt("J0"); j1 = Compound.GetInt("J1"); j2 = Compound.GetInt("J2"); w1 = Compound.GetInt("W1"); w2 = Compound.GetInt("W2"); connection = (Connection)Compound.GetInt("Connection"); }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); j0 = Compound.GetInt("J0"); j1 = Compound.GetInt("J1"); j2 = Compound.GetInt("J2"); j3 = Compound.GetInt("J3"); w1 = Compound.GetInt("W1"); w2 = Compound.GetInt("W2"); w3 = Compound.GetInt("W3"); if (Compound.Contains("Capacitance")) { (Logics as Logics.CapacitorLogics).Capacitance = Compound.GetDouble("Capacitance"); (Logics as Logics.CapacitorLogics).MaxOutputVoltage = Compound.GetDouble("MaxVoltage"); } }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); for (int i = 0; i < Joints.Length; i++) { j[i] = Compound.GetInt("J" + i.ToString()); } for (int i = 0; i < Wires.Length; i++) { w[i] = Compound.GetInt("W" + i.ToString()); } left = (PortState)Compound.GetInt("Left"); up = (PortState)Compound.GetInt("Up"); right = (PortState)Compound.GetInt("Right"); down = (PortState)Compound.GetInt("Down"); }
public override void LoadAll(IO.ComponentData Compound) { base.LoadAll(Compound); var o = Compound.GetVector2("OrigPos"); if (o.X == -1 && o.Y == -1) { origPos = null; } else { origPos = o; } PushedPositions.Clear(); int i = 0; while (true) { if (Compound.Contains("Component" + i.ToString())) { if (Compound.GetString("Component" + i.ToString()) == "list") { int j = 0; List <Vector2> p = new List <Vector2>(); while (true) { if (Compound.Contains("Component" + i.ToString() + j.ToString())) { p.Add(Compound.GetVector2("Component" + i.ToString() + j.ToString())); } else { break; } j++; } PushedPositions.Add(p); } else { PushedPositions.Add(Compound.GetVector2("Component" + i.ToString())); } } else { break; } i++; } i = 0; contains.Clear(); while (true) { if (Compound.Contains("Contains" + i.ToString())) { contains.Add(Compound.GetInt("Contains" + i.ToString())); } else { break; } i++; } if (origPos != null) { ignoreNextPosSave = true; } }