ColliderCollision<T extends App<T> > class
Represents a collision between two CCollider components and exposes helpers for resolving what kind of objects collided.
- Mixed-in types
-
- WithCollisionResolver<
T, Comp< T> >
- WithCollisionResolver<
Constructors
-
ColliderCollision(CCollider<
T> a, CCollider<T> b)
Properties
Methods
-
as<
A extends E, B extends E> () → (A, B)? -
Returns the pair typed as
(A, B)if the collision is between anAand aB(in either order), ornullif neither ordering matches.inherited -
asEntities<
A extends Entity< (T> , B extends Entity<T> >) → (A, B)? -
Returns the owning entities typed as
(A, B)if their types match (in either order), ornullif neither ordering does. -
asHas<
A extends E, B extends Comp< (T> , C extends E, D extends Comp<T> >) → (A, C)? -
Returns the pair typed as
(A, C)only if the types match (A/C) and the corresponding components are present (Bon the first,Don the second).inherited -
asTags(
String aTag, String bTag) → (CCollider< T> , CCollider<T> )? -
Returns the pair ordered as
(aTag, bTag)if the colliders carry those tags (in either order), ornullif the tags don't match. -
has<
A extends Comp< (T> , B extends Comp<T> >) → (Comp< T> , Comp<T> )? -
Returns the pair ordered so that the first element carries component
Aand the second carries componentB, ornullif the collision doesn't involve both component types.inherited -
hasEntities<
A extends Entity< (T> , B extends Entity<T> >) → bool -
Returns
trueif this collision involves one collider's entity to beAand one's entity to beB(in either order). -
hasTags(
String aTag, String bTag) → bool -
Returns
trueif this collision involves one collider taggedaTagand one taggedbTag(in either order). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited