public int ExitOfGate() { if ((in1.InIsnotnull() && in2.InIsnotnull()) && (in1.Getinstate() != 0 && in2.Getinstate() != 0)) { self.condition.SetLink(true); Debug.Log("les deux sont relié"); if ((in1.Getinstate() == 1 && in2.Getinstate() == 2) || (in1.Getinstate() == 2 && in2.Getinstate() == 1)) { Debug.Log(" vrai"); state = 2; self.condition.SetLight(true); return(state); } else { self.condition.SetLight(false); state = 1; return(state); } } self.condition.SetLink(false); self.condition.SetLight(false); state = 0; return(state); }
public int ExitOfGate() { if (in1.InIsnotnull() == true && in1.outinfo.GetState() != 0) { self.condition.SetLink(true); if (in1.outinfo.GetState() == 2) { state = 1; self.condition.SetLight(false); return(state); } else { state = 2; self.condition.SetLight(true); return(state); } } else { state = 0; self.condition.SetLink(false); self.condition.SetLight(false); return(0); } }
public int ExitOfGate() { if ((in1.InIsnotnull() && in2.InIsnotnull()) && (in1.Getinstate() != 0 && in2.Getinstate() != 0)) { self.condition.SetLink(true); if ((in1.Getinstate() == 2 && in2.Getinstate() == 2)) { self.condition.SetLight(false); state = 1; } else { self.condition.SetLight(true); state = 2; } return(state); } state = 0; self.condition.SetLink(false); self.condition.SetLight(false); return(state); }