Exemplo n.º 1
0
 /// <summary>
 /// Bakes all of the specified <c>IDrawProvider</c>s by calling their Draw(GameTime).
 /// </summary>
 /// <param name="drawProviders">Array containing all the <c>IDrawProvider</c>s</param>
 /// <exception cref="System.Exception">BeginBake must be called before Bake</exception>
 public void Bake(IDrawProvider[] drawProviders)
 {
     if (_state != 1)
         if (_state == 0)
             throw new Exception("BeginBake must be called before Bake");
     for (int i = 0; i < drawProviders.Length; ++i)
         drawProviders[i].Draw(_gameTime);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Bakes the specified <c>IDrawProvider</c> by calling its Draw(GameTime).
 /// </summary>
 /// <param name="drawProvider">The draw provider implementing Draw(GameTime).</param>
 /// <exception cref="System.Exception">BeginBake must be called before Bake</exception>
 public void Bake(IDrawProvider drawProvider)
 {
     if (_state != 1)
         if (_state == 0)
             throw new Exception("BeginBake must be called before Bake");
     drawProvider.Draw(_gameTime);
 }