public class StateFactory extends Object
State
instance from its enum value.State
,
StateHandler
Constructor and Description |
---|
StateFactory()
Create the factory.
|
Modifier and Type | Method and Description |
---|---|
void |
addState(State state)
Add a supported state with its corresponding enum value.
|
void |
clear()
Clear the handled states.
|
State |
getState(Enum<?> type)
Get the state instance from its type.
|
public void addState(State state)
state
- The state instance.public void clear()
public State getState(Enum<?> type)
State.enter()
is called.type
- The state type.LionEngineException
- If state does not exist.Copyright © 2017 Byron 3D Games Studio. All rights reserved.