I have 3 methods
MethodA()
MethodB()
MethodC()
All 3 methods must be run at least once per frame/update.
MethodA generates a integer count, let's call it 'intCount'. If the count is 0 then MethodB and MethodC don't need to be called.
All 3 methods will continue to be called, up to 5 times, if MethodA generates an 'intCount' other than 0.
This is my current logic for the above conditions.
for (int i = 0; i < 5; ++i)
{
MethodA();
if (intCount == 0 && i > 0)
{
break;
}
MethodB();
MethodC();
}
I'm not happy with its current state and I was hoping that someone could suggest an improvement.