This commit is contained in:
parent
5f5a3f51d1
commit
ef77c8f3bb
1 changed files with 8 additions and 1 deletions
|
|
@ -363,7 +363,7 @@ namespace DMX2
|
|||
}
|
||||
|
||||
private class circEvTarget : IEventTarget{
|
||||
Circuit c; SequenceurLineaire seq;
|
||||
Circuit c; SequenceurLineaire seq; int s=-2; bool ok=false;
|
||||
public circEvTarget(SequenceurLineaire _seq, Circuit _c){
|
||||
c=_c;
|
||||
seq=_seq;
|
||||
|
|
@ -371,6 +371,13 @@ namespace DMX2
|
|||
#region IEventTarget implementation
|
||||
bool IEventTarget.FireEvent (EventData data)
|
||||
{
|
||||
if (!ok) {
|
||||
int val = seq.ValeurBruteCircuit (c);
|
||||
int cs = Math.Sign (val - data.value);
|
||||
if (s == -2) s =cs;
|
||||
if (cs==0 || cs!=s) ok=true;
|
||||
else return true ;
|
||||
}
|
||||
seq.ChangeValeur(c,data.value);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue