Esempio n. 1
0
        public void Draw(UberSpriteBatch spriteBatch)
        {
            int i;
            spriteBatch.DrawUI(TexturesManager.Window,Bound,colorRect);
            for (i = 0; i < lines.Count;i++)
                spriteBatch.DrawUI(spritefont, lines[i], new Vector2(boundWrite.X, boundWrite.Y + (i * spritefont.MeasureString(lines[i]).Y)), colorText);

            if (IsSelect)
            {
                time++;
                if (time > 30)
                {
                    if (lines.Count > 0)
                        spriteBatch.DrawUI(spritefont, "|",
                                           new Vector2(boundWrite.X + spritefont.MeasureString(lines[i - 1]).X,
                                                       boundWrite.Y +
                                                       ((i - 1)*spritefont.MeasureString(lines[i - 1]).Y)),
                                           colorText);
                    else
                        spriteBatch.DrawUI(spritefont, "|", new Vector2(boundWrite.X, boundWrite.Y), colorText);
                }
                if (time > 60)
                time = 0;
            }
        }
Esempio n. 2
0
 public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
 {
     spriteBatch.DrawUI(TexturesManager.Window, Position);
     for (int i = 0; i < actualPlayer.spells.Count; i++)
     {
         spriteBatch.DrawUI(actualPlayer.spells[i].Icon, new Rectangle(5 + Bounds.X,5 + Bounds.Y + 50 * i,50,50));
     }
 }
Esempio n. 3
0
        public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
        {
            spriteBatch.DrawUI(TexturesManager.Window, new Rectangle((int)Position.X, (int)Position.Y, TexturesManager.Window.Width, TexturesManager.Window.Height));
            spriteBatch.DrawUI(TexturesManager.Level, Resources.Res.Music + " : " + Math.Floor(XactManager.SongVolume * 100) + " %", Position + new Vector2(TexturesManager.Window.Width / 2, 0) - new Vector2(TexturesManager.Level.MeasureString("Musique : 100 %").X / 2, -5), Color.White);
            spriteBatch.DrawUI(TexturesManager.Level, Resources.Res.SoundEffect + " : " + Math.Floor(XactManager.SoundEffectVolume * 100) + " %", Position + new Vector2(TexturesManager.Window.Width / 2, 50) - new Vector2(TexturesManager.Level.MeasureString("Effets Sonores : 100 %").X / 2, -5), Color.White);

            songSlide.Draw(gameTime, spriteBatch);
            soundEffectSlide.Draw(gameTime, spriteBatch);
        }
Esempio n. 4
0
 public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
 {
     if (texture == null)
     {
         spriteBatch.DrawUI(MouseManager.IsInRectangle(Bounds) ? TexturesManager.Zoom : TexturesManager.Menu, text, Position, MouseManager.IsInRectangle(Bounds) ? Color.Red : Color.White);
     }
     else
         spriteBatch.DrawUI(texture, Position, MouseManager.IsInRectangle(Bounds) ? Color.Gray : Color.White);
 }
Esempio n. 5
0
 public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
 {
     spriteBatch.DrawUI(TexturesManager.Window, Bounds);
     spriteBatch.DrawUI(TexturesManager.Menu, "Client :", new Vector2(Bounds.X + Bounds.Width / 2 - TexturesManager.Menu.MeasureString("Serveur :").X / 2, Bounds.Y + TexturesManager.Menu.MeasureString("Serveur :").Y / 2), Color.Red);
     if (!IsJoin)
         joinButton.Draw(gameTime, spriteBatch);
     spriteBatch.DrawUI(TexturesManager.Menu, "Port : ", new Vector2(Bounds.X + 20, Bounds.Y + 60), Color.Red);
     spriteBatch.DrawUI(TexturesManager.Menu, "Nom : ", new Vector2(box[0].Bound.X + box[0].Bound.Width + 20, Bounds.Y + 60), Color.Red);
     spriteBatch.DrawUI(TexturesManager.Menu, "Ip :", new Vector2(Bounds.X + 10, box[0].Bound.Bottom + 20), Color.Red);
     foreach (var textBox in box)
         textBox.Draw(spriteBatch);
 }
Esempio n. 6
0
 public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
 {
     spriteBatch.DrawUI(TexturesManager.Window, Position);
     spriteBatch.DrawUI(TexturesManager.Level, "Niveau du Heros : " + actualPlayer.Level, Position + new Vector2(5, 10), Color.White);
     spriteBatch.DrawUI(TexturesManager.Level, "Vie Maximum : " + actualPlayer.Stats.LifeMax, Position + new Vector2(5,30), Color.White);
     spriteBatch.DrawUI(TexturesManager.Level, "Power Maximum : " + actualPlayer.Stats.PowerMax, Position + new Vector2(5, 50), Color.White);
     spriteBatch.DrawUI(TexturesManager.Level, "Force : " + actualPlayer.Stats.Strength, Position + new Vector2(5, 70), Color.White);
     spriteBatch.DrawUI(TexturesManager.Level, "Dexterite : " + actualPlayer.Stats.Dexterity, Position + new Vector2(5, 90), Color.White);
     spriteBatch.DrawUI(TexturesManager.Level, "Intelligence : " + actualPlayer.Stats.Intelligence, Position + new Vector2(5, 110), Color.White);
     spriteBatch.DrawUI(TexturesManager.Level, "Vie / Seconde : " + actualPlayer.Stats.LifeRegeneration, Position + new Vector2(5, 130), Color.White);
     spriteBatch.DrawUI(TexturesManager.Level, "Power / Seconde: " + actualPlayer.Stats.PowerRegenaration, Position + new Vector2(5, 150), Color.White);
     spriteBatch.DrawUI(TexturesManager.Level, "Victimes : " + actualPlayer.Stats.AmountKilled, Position + new Vector2(5, 170), Color.White);
 }
Esempio n. 7
0
        public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
        {
            spriteBatch.Begin();

            spriteBatch.Draw(TexturesManager.OptionMenu, new Rectangle(0, 0, MainGame.ScreenX, MainGame.ScreenY));
            spriteBatch.DrawUI(TexturesManager.Title, "Wrath of the Rack Ninja", new Vector2(MainGame.ScreenX / 2, MainGame.ScreenY / 2 - 300), Color.Red);
            spriteBatch.DrawUI(TexturesManager.Title, "Options", new Vector2(100, MainGame.ScreenY / 2 - 300), Color.Red);

            soundButton.Draw(gameTime, spriteBatch);
            resolutionButton.Draw(gameTime, spriteBatch);
            backStartButton.Draw(gameTime, spriteBatch);

            spriteBatch.End();
        }
Esempio n. 8
0
        public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
        {
            spriteBatch.Begin();
            spriteBatch.Draw(TexturesManager.MultiMenu, new Rectangle(0, 0, MainGame.ScreenX, MainGame.ScreenY));
            spriteBatch.DrawUI(TexturesManager.Title, "Wrath of the Rack Ninja", new Vector2(MainGame.ScreenX / 2, MainGame.ScreenY / 2 - 300), Color.Red);
            spriteBatch.DrawUI(TexturesManager.Title, "Multijoueurs", new Vector2(100, MainGame.ScreenY / 2 - 300), Color.Red);

            backStartButton.Draw(gameTime, spriteBatch);
            localButton.Draw(gameTime,spriteBatch);

            foreach (Window win in Windows)
                win.Draw(gameTime, spriteBatch);

            spriteBatch.End();
        }
Esempio n. 9
0
 public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
 {
     spriteBatch.DrawUI(TexturesManager.Window, Position);
     spriteBatch.DrawUI(TexturesManager.Level, Resources.Res.HeroLevel + " : " + actualPlayer.Level, Position + new Vector2(5, 10), Color.White);
     spriteBatch.DrawUI(TexturesManager.Level, Resources.Res.LifeMax + " : " + actualPlayer.Stats.LifeMax, Position + new Vector2(5, 30), Color.White);
     spriteBatch.DrawUI(TexturesManager.Level, Resources.Res.PowerMax + " : " + actualPlayer.Stats.PowerMax, Position + new Vector2(5, 50), Color.White);
     spriteBatch.DrawUI(TexturesManager.Level, Resources.Res.Strength + " : " + actualPlayer.Stats.Strength, Position + new Vector2(5, 70), Color.White);
     spriteBatch.DrawUI(TexturesManager.Level, Resources.Res.Dexterity + " : " + actualPlayer.Stats.Dexterity, Position + new Vector2(5, 90), Color.White);
     spriteBatch.DrawUI(TexturesManager.Level, Resources.Res.Intelligence + " : " + actualPlayer.Stats.Intelligence, Position + new Vector2(5, 110), Color.White);
     spriteBatch.DrawUI(TexturesManager.Level, Resources.Res.LifePerSeconde + " : " + actualPlayer.Stats.LifeRegeneration, Position + new Vector2(5, 130), Color.White);
     spriteBatch.DrawUI(TexturesManager.Level, Resources.Res.PowerPerSeconde + " : " + actualPlayer.Stats.PowerRegeneration, Position + new Vector2(5, 150), Color.White);
 }
Esempio n. 10
0
 public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
 {
     if (texture == null)
     {
         spriteBatch.DrawUI(MouseManager.IsInRectangle(Bounds) && !MouseManager.IsClicking() ? TexturesManager.Zoom : TexturesManager.Menu,
                            text, Position, MouseManager.IsInRectangle(Bounds) ? Color.Red : Color.White);
     }
     else if (SlideSize == 0)
         spriteBatch.DrawUI(texture, Position, MouseManager.IsInRectangle(Bounds) ? Color.Gray : Color.White);
     else
     {
         spriteBatch.DrawUI(TexturesManager.SlideBar,
                            new Rectangle((int) BoundLeft, (int) Position.Y,
                                          SlideSize + TexturesManager.MovingCursor.Width - 1,
                                          TexturesManager.MovingCursor.Height));
         spriteBatch.DrawUI(texture, Position, MouseManager.IsInRectangle(Bounds) ? Color.Gray : Color.White);
     }
 }
Esempio n. 11
0
        public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
        {
            spriteBatch.DrawUI(TexturesManager.Window, new Rectangle((int)Position.X, (int)Position.Y, TexturesManager.Window.Width + 100, KeyboardManager.BindedKeys.Length * 20 + 10));
            for (int i = 0; i < KeyboardManager.Description.Length; i++)
            {
                string str = KeyboardManager.Description[i];

                spriteBatch.DrawUI(TexturesManager.Level, str,
                                   Position + new Vector2(10, 5 + i*20), Color.White);
            }

            for (int i = 0; i < KeyboardManager.BindedKeys.Length; i++)
            {
                string str = KeyboardManager.BindedKeys[i].ToString();
                if (str[0] == 'D' && str.Length <= 2)
                    str = str.Substring(1);

                spriteBatch.DrawUI(TexturesManager.Level, str,
                    Position + new Vector2(205, 5 + i * 20), Color.White);
            }
        }
Esempio n. 12
0
        public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
        {
            spriteBatch.Begin();

            spriteBatch.Draw(TexturesManager.BackgroundMenu, new Rectangle(0, 0, MainGame.ScreenX, MainGame.ScreenY));
            spriteBatch.DrawUI(TexturesManager.Title, "Wrath of the Rack Ninja", new Vector2(MainGame.ScreenX / 2, MainGame.ScreenY / 2 - 300), Color.Red);

            startButton.Draw(gameTime, spriteBatch);
            multiplayerButton.Draw(gameTime, spriteBatch);
            optionButton.Draw(gameTime, spriteBatch);
            storyButton.Draw(gameTime, spriteBatch);
            exitButton.Draw(gameTime, spriteBatch);

            spriteBatch.End();
        }
Esempio n. 13
0
 public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
 {
     spriteBatch.DrawUI(texture, Bounds);
     Serveur.Draw(gameTime,spriteBatch);
     Client.Draw(gameTime,spriteBatch);
 }
Esempio n. 14
0
        public override void DrawUI(GameTime gameTime, UberSpriteBatch spriteBatch)
        {
            if (Targeter == null)
                return;

            // Draw la barre de Vie si Targeter est non null
            int size = (int)Life * LifeBarSize / LifeMax;
            for (int i = 0; i < size; i++)
                spriteBatch.DrawUI(TexturesManager.Life, new Vector2(MainGame.ScreenX - LifeBarSize + i, 0), Color.White);
            for (int i = size; i < LifeBarSize; i++)
                spriteBatch.DrawUI(TexturesManager.Life, new Vector2(MainGame.ScreenX - LifeBarSize + i, 0), Color.Gray);
        }
Esempio n. 15
0
 public void DrawInfo(GameTime gameTime, UberSpriteBatch spriteBatch, Color color)
 {
     spriteBatch.DrawUI(TexturesManager.Menu, "Count : " + Entities.Count, new Vector2(MainGame.ScreenX / 2, 5), color);
     spriteBatch.DrawUI(TexturesManager.Menu, "FPS : " + (int)Math.Ceiling(1000 / gameTime.ElapsedGameTime.TotalMilliseconds), new Vector2(MainGame.ScreenX / 2, 25), color);
     spriteBatch.DrawUI(TexturesManager.Menu, "Coord : " + Player.coord.Y + " Y, " + Player.coord.X + " X", new Vector2(MainGame.ScreenX / 2, 45), color);
     spriteBatch.DrawUI(TexturesManager.Menu, "Id : " + (Player.coord.Y * 32 + Player.coord.X), new Vector2(MainGame.ScreenX / 2, 65), color);
     if (Player.Target != null)
     {
         Vector2 coordTarget = new Vector2((int)Math.Ceiling(Player.Target.Position.X * 32 / 1000) - 1, (int)Math.Ceiling(Player.Target.Position.Y * 32 / 1000) - 1);
         spriteBatch.DrawUI(TexturesManager.Menu, "Id target: " + (coordTarget.Y * 32 + coordTarget.X), new Vector2(MainGame.ScreenX / 2, 85), color);
     }
 }
Esempio n. 16
0
        public override void DrawUI(GameTime gameTime, UberSpriteBatch spriteBatch)
        {
            Vector2 position = new Vector2(MainGame.ScreenX / 2 - TexturesManager.PowerBar.Width / 2,
                                           MainGame.ScreenY - TexturesManager.PowerBar.Height) - new Vector2(0, TexturesManager.Xp.Height);

            // Draw la barre de Vie
            int size = (int)Life * LifeBarSize / Stats.LifeMax;
            Vector2 pos = new Vector2(position.X, position.Y - TexturesManager.Life.Height);
            for (int i = 0; i < size; i++)
                spriteBatch.DrawUI(TexturesManager.Life, pos + new Vector2(i, 0), Color.White);
            for (int i = size; i < LifeBarSize; i++)
                spriteBatch.DrawUI(TexturesManager.Life, pos + new Vector2(i, 0), Color.Gray);
            Rectangle bounds = new Rectangle((int)pos.X, (int)pos.Y, LifeBarSize, TexturesManager.Life.Height);
            if (MouseManager.IsInRectangle(bounds))
                spriteBatch.DrawUI(TexturesManager.Level, "Vie : " + (int)Life, pos - new Vector2(0, TexturesManager.Level.MeasureString("Vie : " + Life).Y), Color.Red);

            // Draw la barre de Power
            size = (int)Power * PowerBarSize / Stats.PowerMax;
            pos = new Vector2(position.X + PowerBarSize, position.Y - TexturesManager.Power.Height);
            for (int i = 0; i < size; i++)
                spriteBatch.DrawUI(TexturesManager.Power, pos + new Vector2(i ,0) , Color.White);
            for (int i = size; i < PowerBarSize; i++)
                spriteBatch.DrawUI(TexturesManager.Power, pos + new Vector2(i, 0), Color.Gray);
            bounds = new Rectangle((int)pos.X, (int)pos.Y, PowerBarSize, TexturesManager.Power.Height);
            if (MouseManager.IsInRectangle(bounds))
                spriteBatch.DrawUI(TexturesManager.Level, "Power : " + (int)Power, pos - new Vector2(0, TexturesManager.Level.MeasureString("Power : " + Power).Y), Color.MediumPurple);

            // Draw la barre d'Xp
            size = experience * XpBarSize / ExperienceNeeded;
            for (int i = 0; i < size; i++)
                spriteBatch.DrawUI(TexturesManager.Xp, new Vector2(position.X + i, position.Y + TexturesManager.PowerBar.Height), Color.White);
            for (int i = size; i < XpBarSize; i++)
                spriteBatch.DrawUI(TexturesManager.Xp, new Vector2(position.X + i, position.Y + TexturesManager.PowerBar.Height), (i % 60 == 0 && i != 0) ? Color.Black : Color.Gray);

            // Draw la barre de Sort
            spriteBatch.DrawUI(TexturesManager.PowerBar, position, Color.White);
            position += new Vector2(5, 5);
            Vector2 delta = new Vector2(TexturesManager.PowerBar.Width / 10.0f, 0);

            // Fais clignoter les sorts actifs
            foreach (Spell spell in spells)
            {
                if (!spell.IsActivated || gameTime.TotalGameTime.TotalMilliseconds % 1000 < 500) // Draw si non actif || Draw pendant 500 ms si actif sur 1000 ms
                    spriteBatch.DrawUI(spell.Icon, position);
                position += delta;
            }
        }
Esempio n. 17
0
        public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch)
        {
            spriteBatch.DrawUI(texture, position);

            printNext.Draw(gameTime, spriteBatch);
        }