The way they are linked now using the OnValidate()
rules, there could as well be just one bool for both features, which isn’t necessarily the intention.
I checked the video again to be sure I didn’t write down something else in my code.
It reads:
private void OnValidate()
{
if (oscillate) { stagger = true; }
if (!oscillate) { stagger = false; }
}
What makes much more sense to me is:
private void OnValidate()
{
if (oscillate) { stagger = true; }
if (!stagger) { oscillate = false; }
}
so, when oscillate
gets activated, so does stagger
, and when stagger
gets deactivated, so does oscillate
. But we can have stagger
active without oscillate
.