All Implemented Interfaces:
Destructible, Printable, ApplicationContext, ApplicationProvider, ComponentsContext, ComponentsProvider, EntityContext, EntityProvider, ColoredDrawable, Drawable, SceneContext, SceneProvider

public class CircleCollider extends Collider
  • Field Details

    • radius

      public float radius
  • Constructor Details

    • CircleCollider

      public CircleCollider(float radius)
    • CircleCollider

      public CircleCollider(float radius, Vector2f offset)
  • Method Details

    • collidesWith

      @Experimental public boolean collidesWith(CircleCollider other)
    • collidesWith

      @Experimental public boolean collidesWith(RectCollider other)
    • collidesWith

      @Experimental public boolean collidesWith(Collider other)
      Description copied from class: Collider
      Checks if this collider collides with another collider.
      Overrides:
      collidesWith in class Collider
      Parameters:
      other - The other collider
      Returns:
      true if the colliders are colliding.
    • draw

      public void draw(Renderer renderer, Color color, float depth)
      Description copied from class: Collider
      Draws this collider in a given color.
      Specified by:
      draw in interface ColoredDrawable
      Overrides:
      draw in class Collider
      Parameters:
      renderer - The renderer
      color - The color to draw with
      depth - The depth of the entity