public override void Death() { BoundBox = new RotRectangle(new Rectangle((int)Math.Round(Position.X), (int)Math.Round(Position.Y), Sprite.SpriteRect.Width, Sprite.SpriteRect.Height), angle); BoundBox.Origin = Sprite.Origin; Sprite.Scale = Vector2.One; base.Death(); }
public DetectorPart(int detectionWidth, int detectionHeight, Type type, ITargeting parent, IDs id = IDs.DEFAULT) : base(id) { RotRectangle temp = BoundBox; BoundBox = new RotRectangle(new Rectangle((int)Position.X, (int)Position.Y, detectionWidth, detectionHeight), angle); BoundBox.Origin = temp.Origin; this.parent = parent; this.type = type; }
private void Explode() { exploding = true; Damage = damage; BoundBox = new RotRectangle(new Rectangle((int)Position.X, (int)Position.Y, explosionSize, explosionSize), 0); }
public ExplosionDrop(Vector2 position, IDs id = IDs.DEFAULT) : base(position, id) { explosionTimer = new Timer(explosionTime); originalBoundBox = BoundBox; }
public void IntersectsTest() { RotRectangle rect1 = new RotRectangle(new Rectangle(1, -1, 2, 2), 0); Assert.Fail(); }