Exemplo n.º 1
0
 public GameObject(Texture2D texture, Projectile projectile, Vector2 location, Direction direction, Rectangle windowBounds, bool liftable)
 {
     this.texture = texture;
     this.projectile = projectile;
     this.location = location;
     this.direction = direction;
     this.windowBounds = windowBounds;
     this.liftable = liftable;
     this.selected = false;
     bounds = new Rectangle((int) location.X, (int) location.Y, texture.Width, texture.Height);
     lastFired = -1;
 }
Exemplo n.º 2
0
 public Entity(Texture2D texture, Projectile projectile, Vector2 location, Direction direction, Rectangle bounds, Rectangle windowBounds, int health, int speed)
 {
     this.texture = texture;
     this.projectile = projectile;
     this.location = location;
     this.direction = direction;
     this.bounds = bounds;
     this.windowBounds = windowBounds;
     this.health = health;
     this.speed = speed;
     moved = new Vector2(0f, 0f);
     lastFired = -1;
 }
Exemplo n.º 3
0
 public Entity(Texture2D texture, Projectile projectile, Vector2 location, Direction direction, Rectangle windowBounds, int health, int speed)
     : this(texture, projectile, location, direction, new Rectangle((int) location.X, (int) location.Y, texture.Width, texture.Height), windowBounds, health, speed)
 {
 }
Exemplo n.º 4
0
 /*
  * Sets the entity's projectile to the given projectile
  */
 public void setProjectile(Projectile projectile)
 {
     this.projectile = projectile;
 }
Exemplo n.º 5
0
 /*
  * Adds an active projectile to the level
  */
 public void addProjectile(Projectile projectile)
 {
     projectiles.Add(projectile);
 }
Exemplo n.º 6
0
 public GameObject(Texture2D texture, Projectile projectile, Vector2 location, Rectangle windowBounds, bool liftable)
     : this(texture, projectile, location, Direction.NONE, windowBounds, liftable)
 {
 }