git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1297 993157c7-ee19-0410-b2c4-bb4e9862e678

This commit is contained in:
(no author)
2007-07-17 18:20:50 +00:00
parent 5bb5fc32fe
commit 33abcb1063
13 changed files with 252 additions and 9 deletions

View File

@@ -45,10 +45,17 @@ namespace OpenRa.Game
};
}
double timeUntilNextFrame;
Action<double> tickFunc;
public void Tick( double t )
{
tickFunc( t );
timeUntilNextFrame -= t;
while( timeUntilNextFrame <= 0 )
{
tickFunc( t );
timeUntilNextFrame += ( 40.0 / 1000.0 ); // 25 fps == 40 ms
}
}
}
}