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

Constructors

ColliderCollision(CCollider<T> a, CCollider<T> b)

Properties

a CCollider<T>
The first participant in the collision.
final
b CCollider<T>
The second participant in the collision.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

as<A extends E, B extends E>() → (A, B)?
Returns the pair typed as (A, B) if the collision is between an A and a B (in either order), or null if 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), or null if 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 (B on the first, D on 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), or null if 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 A and the second carries component B, or null if the collision doesn't involve both component types.
inherited
hasEntities<A extends Entity<T>, B extends Entity<T>>() bool
Returns true if this collision involves one collider's entity to be A and one's entity to be B (in either order).
hasTags(String aTag, String bTag) bool
Returns true if this collision involves one collider tagged aTag and one tagged bTag (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