public enum CollisionResponse extends java.lang.Enum<CollisionResponse>
A CollisionResponse is a possible response that a MobileObject can have to colliding with a solid surface.
MobileObject
Enum Constant and Description |
---|
NONE
The MobileObject passes through the surface without its velocity changing
and does not record the collision.
|
SLIDE
The MobileObject's movement is blocked by the surface, and the component
of its velocity toward the surface is eliminated.
|
STOP
The MobileObject's movement is blocked by the surface, and its velocity
is eliminated.
|
Modifier and Type | Method and Description |
---|---|
static CollisionResponse |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CollisionResponse[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CollisionResponse NONE
public static final CollisionResponse SLIDE
public static final CollisionResponse STOP
public static CollisionResponse[] values()
for (CollisionResponse c : CollisionResponse.values()) System.out.println(c);
public static CollisionResponse valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null