示例#1
0
 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;
 }
示例#2
0
 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;
 }
示例#3
0
 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;
 }
示例#4
0
        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];
        }
示例#5
0
 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);
 }
示例#6
0
        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.
        }
示例#7
0
 protected override void LoadContent()
 {
     spriteBatch = new SpriteBatch(GraphicsDevice);
     Globals.Load(this);
     world = new SimulationWorld();
 }
示例#8
0
 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;
 }
示例#9
0
        public Player(SimulationWorld world, Vector2 location) : base(world, location)
        {

        }