getBounds() public method

public getBounds ( ) : Bounds2D,
return Bounds2D,
Ejemplo n.º 1
0
 public bool collidesWith(SpriteCollider other)
 {
     if (pixelCollision) {
         return Collision2D.collides(this,other);
     }
     return getBounds().overlaps(other.getBounds());
 }
Ejemplo n.º 2
0
 private Collision2D(SpriteCollider a, SpriteCollider b)
 {
     this.a = a;
     this.b = b;
     boundsA = a.getBounds();
     boundsB = b.getBounds();
     checkCollsion();
 }
Ejemplo n.º 3
0
 private Collision2D(SpriteCollider a, SpriteCollider b)
 {
     this.a  = a;
     this.b  = b;
     boundsA = a.getBounds();
     boundsB = b.getBounds();
     checkCollsion();
 }
Ejemplo n.º 4
0
 public bool collidesWith(SpriteCollider other)
 {
     if (pixelCollision)
     {
         return(Collision2DSprite.collides(this, other));
     }
     return(getBounds().overlaps(other.getBounds()));
 }
Ejemplo n.º 5
0
 private bool texturesOverlap()
 {
     return(a.getBounds().overlaps(b.getBounds()));
 }