Example for sequential code:
Console.WriteLine("Hello");
Sleep(20);
Console.WriteLine("End");
Example for loop code(function is being looped):
bool step2 = false;
bool step3 = false;
bool beginn = true;
int i = 0;
void looped() //each second
{
if (beginn == true)
{
Console.WriteLine("Hello");
beginn = false;
step2 = true;
}
if (step2 == true)
{
if (i <= 20)
{
i++;
}
else
{
step2 = false;
step3 = true;
}
}
if (step3 == true)
{
Console.WriteLine("End");
step3 = false;
}
}
Which program converts sequential code into loop code? I want to use it for unity, so c#/mono or javascript output is desired.
In general, what are the right terms for each kind of coding?