Skip to content

Commit cec2d6f

Browse files
committed
同期ずれの修正
1 parent 3c548ce commit cec2d6f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Editor/NBitInt.cs

+10
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ public NBitADCWriterMain(NBitIntMain config) : base(config.NBitIntController, co
125125
value = (n >> bit) & 1,
126126
});
127127
}
128+
129+
//Self Transition (Fix Synchronization gap)
130+
for (int bit = 0; bit < config.BitNum; bit++)
131+
{
132+
var v = ((n >> bit) & 1) == 1;
133+
SetTransition(state, state, config.QuickTrans).AddCondition(v ? AnimatorConditionMode.IfNot : AnimatorConditionMode.If, 0, config.BitName[bit]);
134+
}
128135
}
129136
}
130137
protected override void OnInstantiate() { }
@@ -152,6 +159,9 @@ public NBitDACWriterMain(NBitIntMain config) : base(config.NBitIntController, co
152159
name = config.ParameterName,
153160
value = n,
154161
});
162+
163+
//Self Transition (Fix Synchronization gap)
164+
SetTransition(state, state, config.QuickTrans).AddCondition(AnimatorConditionMode.NotEqual, n, config.ParameterName);
155165
}
156166
}
157167
protected override void OnInstantiate() { }

0 commit comments

Comments
 (0)