示例#1
0
        protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            ele.TryPathTo("BaseHealth", true, out subEle);
            subEle.Value = BaseHealth.ToString();

            ele.TryPathTo("Strength", true, out subEle);
            subEle.Value = Strength.ToString();

            ele.TryPathTo("Perception", true, out subEle);
            subEle.Value = Perception.ToString();

            ele.TryPathTo("Endurance", true, out subEle);
            subEle.Value = Endurance.ToString();

            ele.TryPathTo("Charisma", true, out subEle);
            subEle.Value = Charisma.ToString();

            ele.TryPathTo("Intelligence", true, out subEle);
            subEle.Value = Intelligence.ToString();

            ele.TryPathTo("Agility", true, out subEle);
            subEle.Value = Agility.ToString();

            ele.TryPathTo("Luck", true, out subEle);
            subEle.Value = Luck.ToString();
        }
示例#2
0
    public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
    {
        //Draw the background
        //DrawRectangleFilled(new Rectangle(new Point(SCREEN_SIZE.X - OVERLAY_SIZE.X, 0), new Point(OVERLAY_SIZE.X, SCREEN_SIZE.Y)), spriteBatch, Color.Black, 0.4f);
        spriteBatch.Draw(SPR_OVERLAY, new Rectangle(new Point(0, SCREEN_SIZE.Y - OVERLAY_SIZE.Y - 24), new Point(SCREEN_SIZE.X, OVERLAY_SIZE.Y + 24)), Color.White);
        //DrawRectangleFilled(new Rectangle(new Point(20, SCREEN_SIZE.Y - OVERLAY_SIZE.Y), new Point(SCREEN_SIZE.X-45, OVERLAY_SIZE.Y-20)), spriteBatch, Color.DarkGray, 1f);
        if (selected != null)
        {
            if (node != null)
            {
                spriteBatch.Draw(SPR_CIRCLE, (node.GlobalPosition + new Vector2(NODE_SIZE.X / 2, 0)) * Camera.scale, null, null, new Vector2(SPR_CIRCLE.Width / 2, SPR_CIRCLE.Height / 2), 0f, Camera.scale * new Vector2(1f, 0.5f) * ((float)selected.range) / ((float)SPR_CIRCLE.Width / 2), new Color(0.2f, 0.2f, 0.2f, 0.05f));                              // draw the range indicator
                spriteBatch.Draw(selected.sprite, (node.GlobalPosition + new Vector2(NODE_SIZE.X / 2, 0)) * Camera.scale, null, null, new Vector2(selected.sprite.Width, selected.sprite.Height) / 2, 0f, Camera.scale, new Color(255, 255 * selectedPossible.ToInt(), 255 * selectedPossible.ToInt(), selectedPossible.ToInt() + 0.5f), SpriteEffects.None, 0); //Draw the selected object at the mouse
            }
        }

        //draw gamestats
        spriteBatch.Draw(ICON_WAVE, new Rectangle(new Point(5, 9), new Point(40, 28)), Color.White);
        DrawText(spriteBatch, FNT_GAMESTATS, "Wave " + Wave.ToString(), new Vector2(55, 7), Color.White);

        spriteBatch.Draw(ICON_KILLS, new Rectangle(new Point(3, 52), new Point(40, 50)), Color.White);
        DrawText(spriteBatch, FNT_GAMESTATS, TotalEnemiesKilled.ToString(), new Vector2(55, 62), Color.White);

        spriteBatch.Draw(ICON_COINS, new Rectangle(new Point(3, 113), new Point(40, 50)), Color.White);
        DrawText(spriteBatch, FNT_GAMESTATS, EcResources.ToString(), new Vector2(55, 114), Color.White);

        spriteBatch.Draw(ICON_LIFE, new Rectangle(new Point(3, 174), new Point(40, 40)), Color.White);
        DrawText(spriteBatch, FNT_GAMESTATS, BaseHealth.ToString() + "/" + MaxBaseHealth.ToString(), new Vector2(55, 170), Color.White);

        //
        //DrawGrid(spriteBatch);

        //Draw the WaveTime
        if (!GameStats.InWave)
        {
            DrawText(spriteBatch, FNT_MENU, "Next wave in: " + (int)(GameStats.WaveTimer / 60), GAME_WINDOW_SIZE.toVector() / 2, Color.White, true);
            DrawText(spriteBatch, FNT_MENU, "Press enter to call wave early", GAME_WINDOW_SIZE.toVector() / 2 + new Vector2(0, 50), Color.White, true);
        }

        base.Draw(gameTime, spriteBatch);
    }