Пример #1
0
        public void draw(Camera camera, SpriteBatch spriteBatch, SpriteFont font)
        {
            //TODO

            graphicsDevice.DepthStencilState = DepthStencilState.DepthRead;
            graphicsDevice.BlendState        = BlendState.Additive;
            billboardEngine.Draw(graphicsDevice, camera);
            graphicsDevice.BlendState        = BlendState.Opaque;
            graphicsDevice.DepthStencilState = DepthStencilState.Default;

            foreach (NPC npc in _content)
            {
                npc.draw(camera, queue);
            }

            while (queue.Count > 0)
            {
                DmgNumber num   = queue.Dequeue();
                Color     color = (num.crit) ? Color.Gold : Color.White;

                spriteBatch.Begin();
                spriteBatch.DrawString(font, num.dmg.ToString(), num.position, color);
                spriteBatch.End();
            }

            graphicsDevice.BlendState        = BlendState.Opaque;
            graphicsDevice.DepthStencilState = DepthStencilState.Default;
            graphicsDevice.SamplerStates[0]  = SamplerState.LinearWrap;
            graphicsDevice.RasterizerState   = RasterizerState.CullCounterClockwise;
        }
Пример #2
0
 public void Draw(Camera camera)
 {
     graphicsDevice.DepthStencilState = DepthStencilState.DepthRead;
     graphicsDevice.BlendState        = BlendState.Additive;
     billboardEngine.Draw(graphicsDevice, camera);
     graphicsDevice.BlendState        = BlendState.Opaque;
     graphicsDevice.DepthStencilState = DepthStencilState.Default;
     particleEffect.Draw(camera);
 }
Пример #3
0
 public void Draw(Camera camera, GraphicsDevice graphicsDevice)
 {
     graphicsDevice.DepthStencilState = DepthStencilState.DepthRead;
     graphicsDevice.BlendState        = BlendState.Additive;
     graphicsDevice.RasterizerState   = RasterizerState.CullNone;
     if (numParticles > 0)
     {
         billboardEngine.Draw(graphicsDevice, camera);
     }
     graphicsDevice.RasterizerState   = RasterizerState.CullCounterClockwise;
     graphicsDevice.BlendState        = BlendState.Opaque;
     graphicsDevice.DepthStencilState = DepthStencilState.Default;
 }