Example #1
0
 public Hazard(Texture2D texture, Vector2 position, float width, float height)
 {
     this.texture  = texture;
     this.position = position;
     bounds        = new BoundingRectangle(position, width, height);
 }
Example #2
0
 public Hazard(Texture2D texture, float width, float height)
 {
     this.texture = texture;
     position     = new Vector2(0, 0);
     bounds       = new BoundingRectangle(position, width, height);
 }
Example #3
0
 public Cell(Maze maze, BoundingRectangle bounds)
 {
     this.maze = maze;
     Bounds    = bounds;
 }
Example #4
0
 /// <summary>
 /// Constructs a new platform
 /// </summary>
 /// <param name="bounds">The platform's bounds</param>
 /// <param name="sprite">The platform's sprite</param>
 public Platform(BoundingRectangle bounds, Sprite sprite)
 {
     this.bounds = bounds;
     this.sprite = sprite;
     tileCount   = (int)bounds.Width / sprite.Width;
 }
Example #5
0
 public Lane(Game1 game, int id)
 {
     this.game = game;
     laneID    = id;
     Bounds    = new BoundingRectangle();
 }