예제 #1
0
 public void draw(cCustomSpriteBatch batch)
 {
     Vector2 cam = cCamera.Instance.Position;
      batch.Effect = _effect;
      batch.ResetMatrices(800, 600);
      batch.Effect.Parameters["Noise_Tex"].SetValue(_noiseTex);
      batch.Effect.Parameters["Flame_Tex"].SetValue(_flameTex);
      batch.Effect.Parameters["time"].SetValue(_timeSeconds);
      batch.Draw(new Rectangle((int)(Position.X - cam.X - Width / 2), (int)(Position.Y - cam.Y - Height / 2), (int)Width, (int)Height), Color.White);
      batch.Flush();
 }
예제 #2
0
        public cEngine(GraphicsDeviceManager gd, ContentManager cm)
        {
            _instance = this;
            _graphics = gd;
            _contentManager = cm;

            _postProcessor = new cPostProcessor(gd.GraphicsDevice, cm);
            _gameState = GAME_STATE.NOTHING;
            _batch = new cCustomSpriteBatch(gd.GraphicsDevice);

            _HUD = new cHUD();
        }
예제 #3
0
 public void drawShaderEffects(cCustomSpriteBatch batch)
 {
     for (int i = 0; i < _shaderObjects.Count; i++)
     {
         _shaderObjects[i].draw(batch);
     }
 }