public void Tick()
{
if (Loading) return;
if (CurrentGameState == GameState.Playing)
{
if (InHaltMode)
{
if (waitingForTickContinue)
return;
}
tickCount++;
tickObjects();
SonicToon.Ticking = true;
try
{
SonicToon.Tick(SonicLevel);
}
/*
catch (Exception exc)
{
string txt = "There was an error on this page.\n\n";
txt += "Error description: " + exc.Message + "\n\n";
txt += "Stack: " + exc.InnerException + "\n\n"; //todo::callstack
Global.Global.Console.Log(exc.Me());
Window.Alert(txt);
throw exc;
}
*/
finally
{
SonicToon.Ticking = false;
}
if (InHaltMode)
{
if (waitingForTickContinue)
return;
waitingForTickContinue = true;
waitingForDrawContinue = false;
}
/* if (SonicToon.X > 128 * SonicLevel.LevelWidth)
SonicToon.X = 0;*/
}
}