コード例 #1
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(Sprite, ConvertUnits.ToDisplayUnits(body.Position), SpritePosition, color, 0f, new Vector2(Tiles.X / 2, Tiles.Y / 2), Scale, FlipH ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0);
            DrawVie(spriteBatch);
            // Draw les sorts
            try
            {
                foreach (Spell s in spellsUpdate)
                {
                    s.Draw(spriteBatch);
                }
            }
            catch
            {
            }
            foreach (Item i in Inventory)
            {
                if (i.Activated)
                {
                    i.spell.Draw(spriteBatch);
                }
            }
            // Draw projectile
            if (Projectile != null)
            {
                Projectile.Draw(spriteBatch);
            }
            // Pour voir le pathfinding

            /*foreach (Noeud n in ObjectifListe)
             *  spriteBatch.Draw(PackTexture.blank, new Rectangle((int)n.Position.X * 32, (int)n.Position.Y * 32, 32, 32), Color.White);
             */}