using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Content; using System; using System.Collections.Generic; using System.Text; using Sprint3_actual.SpriteFactories; namespace Sprint3_actual.BorderElements { class DungeonBorder : IBorder { private ISprite sprite; private Rectangle posRectangle; private Rectangle hitbox; public DungeonBorder(int x, int y, int type) { //top at y 168 if(type == 0) { posRectangle = new Rectangle(0 + x, 168 + y, 336, 96); hitbox = new Rectangle(0 + x, 168 + y, 344, 96); } else if (type == 1) { posRectangle = new Rectangle(0 + x, 168 + y, 96, 216); hitbox = new Rectangle(0 + x, 168 + y, 96, 224); } else if (type == 2) { posRectangle = new Rectangle(0 + x, 480 + y, 96, 216); hitbox = new Rectangle(0 + x, 472 + y, 96, 224); } else if (type == 3) { posRectangle = new Rectangle(0 + x, 600 + y, 336, 96); hitbox = new Rectangle(0 + x, 600 + y, 344, 96); } else if (type == 4) { posRectangle = new Rectangle(432 + x, 600 + y, 336, 96); hitbox = new Rectangle(424 + x, 600 + y, 344, 96); } else if (type == 5) { posRectangle = new Rectangle(672 + x, 480 + y, 96, 216); hitbox = new Rectangle(672 + x, 472 + y, 96, 224); } else if (type == 6) { posRectangle = new Rectangle(672 + x, 168 + y, 96, 216); hitbox = new Rectangle(672 + x, 168 + y, 96, 224); } else { posRectangle = new Rectangle(432 + x, 168 + y, 336, 96); hitbox = new Rectangle(424 + x, 168 + y, 344, 96); } this.sprite = BorderElementsSpriteFactory.Instance.CreateBorder(this, type); } public Rectangle getPos() { return posRectangle; } public Rectangle getHitbox() { return hitbox; } public void DrawBorder() { sprite.draw(); } public void UpdateBorder() { } } }