public Bullet(SimulationWorld world, Vector2 location, Vector2 direction, Entity owner) : base(world, new Rectangle(0, 0, 5, 5), Globals.pixel) { this.location = location; this.direction = direction; this.owner = owner; speed = 400; }
public Bullet(SimulationWorld world, Entity entity, Vector2 location, Vector2 direction) : base(world, new Rectangle(0, 0, 5, 5), new Rectangle(0, 0, 1, 1), Globals.pixel) { this.entity = entity; this.location = location; this.direction = direction; distance = 0; speed = 400; }
public GameObject(SimulationWorld world, Rectangle recHit, Rectangle recDraw, Texture2D texture) { this.world = world; this.recHit = recHit; this.recDraw = recDraw; this.texture = texture; this.color = Color.Black; }
public Entity(SimulationWorld world, Vector2 location) : base(world, new Rectangle(0, 0, 32, 32), new Rectangle(0, 0, 32, 32), Globals.sheet) { speed = 200; defaultSpeed = speed; healthBar = new HealthBar(100, this); recDraw.X = Globals.random.Next(4) * 32; this.location = location; debugArray = new string[5]; }
public Ai(SimulationWorld world, Vector2 location) : base(world, location) { color = Color.FromNonPremultiplied(Globals.random.Next(255), Globals.random.Next(255), Globals.random.Next(255), 255); }
public float time; //Time delay for fire. /// <summary> /// Constructor. /// </summary> /// <param name="world">The world the entity lives in.</param> /// <param name="location">The location we want to spawn the entity at.</param> public DAIController(SimulationWorld world, Vector2 location) : base(world, location) { targetpos = new Vector2(Globals.random.Next(1280), Globals.random.Next(720)); //Walk to random position. }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); Globals.Load(this); world = new SimulationWorld(); }
public Health(SimulationWorld world, Vector2 location) : base(world, new Rectangle(0, 0, 10, 10), new Rectangle(0, 0, 1, 1), Globals.pixel) { recHit.X = (int)(location.X - recHit.Width / 2); recHit.Y = (int)(location.Y - recHit.Width / 2); color = Color.Red; }
public Player(SimulationWorld world, Vector2 location) : base(world, location) { }