Ejemplo n.º 1
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));
        }
Ejemplo n.º 2
0
 public override void Draw(SpriteBatch spriteBatch, GameTime gameTime)
 {
     camera.CalculateTransformation();
     logo.Draw(spriteBatch, gameTime, camera);
 }