public override bool CheckComplete(BreadboardManager bm) { if (choice == "a") { foreach (KeyValuePair <int, CircuitComponent> component in bm.wires) { if (component.Value.inputPositions[0, 0] == 1 || component.Value.outputPositions[0, 0] == 1 && component.Value.inputPositions[0, 1] >= 7 && component.Value.inputPositions[0, 1] <= 11) { return(true); } } } else { foreach (KeyValuePair <int, CircuitComponent> component in bm.wires) { if (component.Value.inputPositions[0, 0] == 2 || component.Value.outputPositions[0, 0] == 2 && component.Value.inputPositions[0, 1] >= 7 && component.Value.inputPositions[0, 1] <= 11) { return(true); } } } return(false); }
public override bool CheckComplete(BreadboardManager bm) { foreach (KeyValuePair <int, CircuitComponent> component in bm.icsEight) { Debug.Log(BreadboardManager.instance.stripsPower[component.Value.inputPositions[4, 0], component.Value.inputPositions[4, 1]]); Debug.Log(BreadboardManager.instance.stripsPower[component.Value.inputPositions[5, 0], component.Value.inputPositions[5, 1]]); if (BreadboardManager.instance.stripsPower[component.Value.inputPositions[4, 0], component.Value.inputPositions[4, 1]] == -1 && BreadboardManager.instance.stripsPower[component.Value.inputPositions[5, 0], component.Value.inputPositions[5, 1]] == 1) { boolone = true; } } foreach (KeyValuePair <int, CircuitComponent> component in bm.icsFour) { Debug.Log(BreadboardManager.instance.stripsPower[component.Value.inputPositions[3, 0], component.Value.inputPositions[3, 1]]); Debug.Log(BreadboardManager.instance.stripsPower[component.Value.inputPositions[4, 0], component.Value.inputPositions[4, 1]]); if (BreadboardManager.instance.stripsPower[component.Value.inputPositions[3, 0], component.Value.inputPositions[3, 1]] == -1 && BreadboardManager.instance.stripsPower[component.Value.inputPositions[4, 0], component.Value.inputPositions[4, 1]] == 1) { booltwo = true; } } if (boolone && booltwo) { return(true); } return(false); }
public void CheckSteps(BreadboardManager bm) { for (int i = 0; i < steps.Length; i++) { if (i == 0) { stepsCompleted[i] = steps[i].CheckComplete(bm); } else { if (stepsCompleted[i - 1] && !stepsCompleted[i]) { stepsCompleted[i] = steps[i].CheckComplete(bm); } } } for (int i = 0; i < stepsCompleted.Length; i++) { if (stepsCompleted[i]) { CompleteStep(i); } } }
public override bool CheckComplete(BreadboardManager bm) { if (bm.leds.Count >= count) { return(true); } return(false); }
public override bool CheckComplete(BreadboardManager bm) { if (bm.switches.Count >= 1) { return(true); } return(false); }
public override bool CheckComplete(BreadboardManager bm) { if (bm.strips[63, 1] != null && bm.strips[63, 0] != null) { return(true); } else { return(false); } }
private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Debug.Log("Instance already exists, destroying object!"); Destroy(this); } }
public override bool CheckComplete(BreadboardManager bm) { if (charge == 1) { if (componentType == "wire") { foreach (KeyValuePair <int, CircuitComponent> component in bm.wires) { foreach (KeyValuePair <int, CircuitComponent> led in bm.leds) { if (component.Value.inputPositions[0, 1] == charge && component.Value.outputPositions[0, 0] == led.Value.outputPositions[0, 0]) { Debug.Log("returning true"); return(true); } } } } } else { if (componentType == "wire") { foreach (KeyValuePair <int, CircuitComponent> component in bm.wires) { foreach (KeyValuePair <int, CircuitComponent> led in bm.leds) { Debug.Log("-------------------------"); Debug.Log(component.Value.inputPositions[0, 1] == charge); Debug.Log(component.Value.outputPositions[0, 0] == led.Value.inputPositions[0, 0]); Debug.Log(component.Value.inputPositions[0, 1] == charge && component.Value.outputPositions[0, 0] == led.Value.inputPositions[0, 0]); if (component.Value.inputPositions[0, 1] == charge && component.Value.outputPositions[0, 0] == led.Value.inputPositions[0, 0]) { Debug.Log("returning true"); return(true); } } } } } return(false); }
public override bool CheckComplete(BreadboardManager bm) { if (ic == "7408") { if (bm.icsEight.Count >= 1) { return(true); } } else { if (bm.icsFour.Count >= 1) { return(true); } } return(false); }
public override bool CheckComplete(BreadboardManager bm) { return(bm.powerOn); }
public override bool CheckComplete(BreadboardManager bm) { return(PowerManager.instance.battery); }
public abstract bool CheckComplete(BreadboardManager bm);