getBounds() public method

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