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; }
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; }
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) { }
/* * Sets the entity's projectile to the given projectile */ public void setProjectile(Projectile projectile) { this.projectile = projectile; }
/* * Adds an active projectile to the level */ public void addProjectile(Projectile projectile) { projectiles.Add(projectile); }
public GameObject(Texture2D texture, Projectile projectile, Vector2 location, Rectangle windowBounds, bool liftable) : this(texture, projectile, location, Direction.NONE, windowBounds, liftable) { }