Exemplo n.º 1
0
        public override void Draw(GameTime GameTime)
        {
            LightingEngine LE = (LightingEngine)Renderer.GetRenderEffect("LightingEngine");

            if (!Opened)
            {
                Renderer.Draw(GeneralManager.Textures["Entities/" + GetName() + "Closed"], Position, Color.White, Fixture.Body.Rotation, new Vector2(Position.Width / 2, Position.Height / 2));
                LE.DrawNormal(GeneralManager.Textures["Entities/" + GetName() + "Closed" + "_normal"], Position, null, Fixture.Body.Rotation, new Vector2(Position.Width / 2, Position.Height / 2));
            }
            else
            {
                Renderer.Draw(GeneralManager.Textures["Entities/" + GetName() + "Open"], Position, Color.White, Fixture.Body.Rotation, new Vector2(Position.Width / 2, Position.Height / 2));
                LE.DrawNormal(GeneralManager.Textures["Entities/" + GetName() + "Open" + "_normal"], Position, null, Fixture.Body.Rotation, new Vector2(Position.Width / 2, Position.Height / 2));
            }
        }
Exemplo n.º 2
0
        public override void Draw(GameTime GameTime)
        {
            LightingEngine LE = (LightingEngine)Renderer.GetRenderEffect("LightingEngine");

            Renderer.Draw(GeneralManager.Textures["Entities/" + GetName()], Position, Color.White, Fixture.Body.Rotation, new Vector2(Position.Width / 2, Position.Height / 2));
            LE.DrawNormal(GeneralManager.Textures["Entities/" + GetName() + "_normal"], Position, null, Fixture.Body.Rotation, new Vector2(Position.Width / 2, Position.Height / 2));

            base.Draw(GameTime); //We must do it, if we want to draw highlight on Entity
        }
Exemplo n.º 3
0
        public override void Draw(GameTime GameTime)
        {
            LightingEngine LE = (LightingEngine)Renderer.GetRenderEffect("LightingEngine");

            Renderer.Draw(GeneralManager.Textures["Particles/" + GetName()], Position, Color.White, Fixture.Body.Rotation, new Vector2(Position.Width / 2, Position.Height / 2), 10);
            LE.DrawNormal(GeneralManager.Textures["Particles/" + GetName() + "_normal"], Position, null, Fixture.Body.Rotation, new Vector2(Position.Width / 2, Position.Height / 2), 10);

            base.Draw(GameTime);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Draw method
        /// </summary>
        /// <param name="gameTime">Time that passed since last Update loop</param>
        public void Draw(GameTime gameTime)
        {
            if (!Isolated && IsVisible)
            {
                Rectangle r = new Rectangle(position.X, position.Y, position.Width, position.Height);

                Renderer.Draw(GeneralManager.Textures[texName], r, Color.White, Z);

                LightingEngine LE = (LightingEngine)Renderer.GetRenderEffect("LightingEngine");
                LE.DrawNormal(GeneralManager.Textures[normName], r);
            }
        }