Ejemplo n.º 1
0
 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();
 }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 private void Explode()
 {
     exploding = true;
     Damage    = damage;
     BoundBox  = new RotRectangle(new Rectangle((int)Position.X, (int)Position.Y, explosionSize, explosionSize), 0);
 }
Ejemplo n.º 4
0
 public ExplosionDrop(Vector2 position, IDs id = IDs.DEFAULT) : base(position, id)
 {
     explosionTimer   = new Timer(explosionTime);
     originalBoundBox = BoundBox;
 }
Ejemplo n.º 5
0
        public void IntersectsTest()
        {
            RotRectangle rect1 = new RotRectangle(new Rectangle(1, -1, 2, 2), 0);

            Assert.Fail();
        }