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
}
}
}
}

View File

@@ -70,6 +70,7 @@ namespace OpenRa.Game
world.Add( new Refinery( new int2( 7, 5 ), 2 ) );
sidebar = new Sidebar(Race.Soviet, renderer, viewport);
}
void PrecacheStructure(string name)

View File

@@ -44,6 +44,7 @@
<Compile Include="Animation.cs" />
<Compile Include="Building.cs" />
<Compile Include="Log.cs" />
<Compile Include="PathFinder.cs" />
<Compile Include="Sequence.cs" />
<Compile Include="ConstructionYard.cs" />
<Compile Include="float2.cs" />

View File

@@ -21,8 +21,9 @@ namespace OpenRa.Game
}
catch( Exception e )
{
File.WriteAllText( "error.log", e.ToString() );
throw;
File.WriteAllText( "error.log", e.ToString() );
Log.Write( "{0}", e.ToString() );
throw;
}
}
}