root/src/ZuneDemo/Renderer/DrawableAgent.cs

User picture

Author: conkerjo

Revision: 30 («Previous)


File Size: 931 Bytes

(November 01, 2009 14:48 UTC) Over 2 years ago

Added Zune HD support and simple sample

 
Show/hide line numbers
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Brains.Framework;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;

namespace ZuneDemo.Renderer
{
    public class DrawableAgent : Agent
    {
        Texture2D texture;
        public DrawableAgent(ContentManager content, Vector2 position, float radius) : base(position, radius)
        {
            this.texture = content.Load<Texture2D>("Textures/circle");
        }

        public void Render(SpriteBatch batch)
        {
            batch.Draw(
                this.texture,
                this.Position,
                null,
                Color.White,
                0,
                new Vector2(texture.Width / 2, texture.Height / 2),
                1, 
                SpriteEffects.None, 
                0);
        }
    }
}