Class CircleCollider
java.lang.Object
dev.prozilla.pine.core.component.Component
dev.prozilla.pine.core.component.physics.collision.Collider
dev.prozilla.pine.core.component.physics.collision.CircleCollider
- All Implemented Interfaces:
Destructible,Printable,ApplicationContext,ApplicationProvider,ComponentsContext,ComponentsProvider,EntityContext,EntityProvider,ColoredDrawable,Drawable,SceneContext,SceneProvider
-
Field Summary
FieldsFields inherited from class dev.prozilla.pine.core.component.physics.collision.Collider
DEFAULT_COLOR, offset -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancollidesWith(CircleCollider other) booleancollidesWith(Collider other) Checks if this collider collides with another collider.booleancollidesWith(RectCollider other) voidDraws this collider in a given color.Methods inherited from class dev.prozilla.pine.core.component.physics.collision.Collider
draw, draw, draw, getOrigin, getOriginX, getOriginYMethods inherited from class dev.prozilla.pine.core.component.Component
destroy, equals, getApplication, getEntity, getName, getScene, hashCode, onEntityChange, setActive, setEntity, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.prozilla.pine.core.ApplicationProvider
getAudioDevice, getConfig, getInput, getLocalStorage, getLogger, getModManager, getRenderer, getTimer, getTracker, getWindowMethods inherited from interface dev.prozilla.pine.core.component.ComponentsProvider
getComponent, getComponentInParent, getComponentInParent, getComponents, getComponentsInChildrenMethods inherited from interface dev.prozilla.pine.core.entity.EntityContext
isDescendantOfMethods inherited from interface dev.prozilla.pine.core.entity.EntityProvider
getChild, getChildWithTag, getFirstChild, getLastChild, getParentWithTag, getTransform, isDescendantOfMethods inherited from interface dev.prozilla.pine.core.scene.SceneProvider
getCameraData, getWorld
-
Field Details
-
radius
public float radius
-
-
Constructor Details
-
CircleCollider
public CircleCollider(float radius) -
CircleCollider
-
-
Method Details
-
collidesWith
-
collidesWith
-
collidesWith
Description copied from class:ColliderChecks if this collider collides with another collider.- Overrides:
collidesWithin classCollider- Parameters:
other- The other collider- Returns:
trueif the colliders are colliding.
-
draw
Description copied from class:ColliderDraws this collider in a given color.- Specified by:
drawin interfaceColoredDrawable- Overrides:
drawin classCollider- Parameters:
renderer- The renderercolor- The color to draw withdepth- The depth of the entity
-