public enum Orientation extends Enum<Orientation>
Enum Constant and Description |
---|
EAST
Looking east.
|
NORTH
Looking north.
|
NORTH_EAST
Looking north east.
|
NORTH_WEST
Looking north west.
|
SOUTH
Looking down.
|
SOUTH_EAST
Looking south east.
|
SOUTH_WEST
Looking south west.
|
WEST
Looking west.
|
Modifier and Type | Field and Description |
---|---|
static int |
ORIENTATIONS_NUMBER
Orientations number.
|
static int |
ORIENTATIONS_NUMBER_HALF
Number of elements on one side.
|
Modifier and Type | Method and Description |
---|---|
static Orientation |
get(int stx,
int sty,
int dtx,
int dty)
Get the orientation depending of the current tile index and destination tile index.
|
static Orientation |
next(Orientation from,
int offset)
Get the next orientation from the source plus an offset.
|
static Orientation |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Orientation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Orientation NORTH
public static final Orientation NORTH_EAST
public static final Orientation EAST
public static final Orientation SOUTH_EAST
public static final Orientation SOUTH
public static final Orientation SOUTH_WEST
public static final Orientation WEST
public static final Orientation NORTH_WEST
public static final int ORIENTATIONS_NUMBER
public static final int ORIENTATIONS_NUMBER_HALF
public static Orientation[] values()
for (Orientation c : Orientation.values()) System.out.println(c);
public static Orientation 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 static Orientation next(Orientation from, int offset)
from
- The source orientation.offset
- The offset to apply.public static Orientation get(int stx, int sty, int dtx, int dty)
stx
- The starting horizontal tile index.sty
- The starting vertical tile index.dtx
- The destination horizontal tile index.dty
- The destination vertical tile index.null
if unchanged).Copyright © 2017 Byron 3D Games Studio. All rights reserved.