public enum MovementTile extends Enum<MovementTile> implements Nameable
Enum Constant and Description |
---|
DIAGONAL_DOWN_LEFT
Diagonal down-left movement.
|
DIAGONAL_DOWN_RIGHT
Diagonal down-right movement.
|
DIAGONAL_UP_LEFT
Diagonal up-left movement.
|
DIAGONAL_UP_RIGHT
Diagonal up-right movement.
|
DOWN
Down movement.
|
LEFT
Left movement.
|
NONE
No movement.
|
RIGHT
Right movement.
|
UP
Up movement.
|
Modifier and Type | Method and Description |
---|---|
static MovementTile |
from(int sx,
int sy)
Get movement from tile movement.
|
String |
getName() |
boolean |
is(int sx,
int sy)
Check if is movement.
|
static MovementTile |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MovementTile[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MovementTile UP
public static final MovementTile DOWN
public static final MovementTile LEFT
public static final MovementTile RIGHT
public static final MovementTile DIAGONAL_UP_LEFT
public static final MovementTile DIAGONAL_UP_RIGHT
public static final MovementTile DIAGONAL_DOWN_LEFT
public static final MovementTile DIAGONAL_DOWN_RIGHT
public static final MovementTile NONE
public static MovementTile[] values()
for (MovementTile c : MovementTile.values()) System.out.println(c);
public static MovementTile valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean is(int sx, int sy)
sx
- The horizontal side.sy
- The vertical side.true
if is movement, false
else.public static MovementTile from(int sx, int sy)
sx
- The horizontal side.sy
- The vertical side.Copyright © 2017 Byron 3D Games Studio. All rights reserved.