Ejemplo n.º 1
0
        public override void Draw()
        {
            SpriteBatch.Begin();

            //SHADERS START
            if (blurEffect == null)
            {
                blurEffect = new BlurEffect(SpriteBatch.GraphicsDevice, Content);
            }
            SpriteBatch.End();
            blurEffect.start();
            SpriteBatch.Begin();

            SpriteBatch.Draw(background, background_dest, Color.Navy);
            visualizer.Draw(SpriteBatch);
            //pad.Draw(SpriteBatch);
            //lifebar.Draw(SpriteBatch);

            // SHADERS END
            SpriteBatch.End();
            blurEffect.applyEffect(SpriteBatch);
            SpriteBatch.Begin();

            pad.Draw(SpriteBatch);
            lifebar.Draw(SpriteBatch);
            grades.Draw(SpriteBatch);

            //runner.Draw(SpriteBatch);

            SpriteBatch.End();
            base.Draw();
        }
Ejemplo n.º 2
0
        public override void ModifyInterfaceLayers(List <GameInterfaceLayer> layers)
        {
            layers.Add(new LegacyGameInterfaceLayer("NutKracker: Intro Text",
                                                    delegate
            {
                if (IntroText.Visible)
                {
                    customResources.Update(Main._drawInterfaceGameTime);
                    introText.Draw(Main.spriteBatch);
                }

                return(true);
            }, InterfaceScaleType.UI));

            layers.Add(new LegacyGameInterfaceLayer("NutKracker: LifeBar",
                                                    delegate
            {
                if (Main.npc.Any(n => n.active && n.modNPC is MainBody))
                {
                    customResourcesBar.Update(Main._drawInterfaceGameTime);
                    lifeBar.Draw(Main.spriteBatch);
                }
                return(true);
            }, InterfaceScaleType.UI));
        }