1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 |
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);
}
}
} |