Class InGameState
- java.lang.Object
-
- org.newdawn.slick.state.BasicGameState
-
- net.egartley.beyondorigins.gamestates.InGameState
-
- All Implemented Interfaces:
org.newdawn.slick.ControlledInputReciever
,org.newdawn.slick.ControllerListener
,org.newdawn.slick.InputListener
,org.newdawn.slick.KeyListener
,org.newdawn.slick.MouseListener
,org.newdawn.slick.state.GameState
public class InGameState extends org.newdawn.slick.state.BasicGameState
-
-
Field Summary
Fields Modifier and Type Field Description static Building
building
static boolean
canPlay
static DialoguePanel
dialogue
static int
ID
static boolean
isDialogueVisible
static boolean
isInventoryVisible
private static java.util.ArrayList<KeyTyped>
keyTypeds
static Map
map
static java.util.ArrayList<Map>
maps
private static java.util.ArrayList<NotificationBanner>
notifications
static PlayerMenu
playerMenu
-
Constructor Summary
Constructors Constructor Description InGameState()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
changeMap(int i)
Leaves the player from the current map, and enters them into the new one.void
enter(org.newdawn.slick.GameContainer container, org.newdawn.slick.state.StateBasedGame game)
int
getID()
static void
giveQuest(Quest quest, boolean start)
Give the player a questvoid
init(org.newdawn.slick.GameContainer container, org.newdawn.slick.state.StateBasedGame game)
void
leave(org.newdawn.slick.GameContainer container, org.newdawn.slick.state.StateBasedGame game)
static void
onNotificationFinish(NotificationBanner notification)
Remove the notification from the queuestatic void
pushNotification(NotificationBanner notification)
Add a notification to the notification queuestatic void
removeQuest(Quest quest)
Remove, or clear, a quest from the playervoid
render(org.newdawn.slick.GameContainer container, org.newdawn.slick.state.StateBasedGame game, org.newdawn.slick.Graphics graphics)
void
update(org.newdawn.slick.GameContainer container, org.newdawn.slick.state.StateBasedGame game, int delta)
-
Methods inherited from class org.newdawn.slick.state.BasicGameState
controllerButtonPressed, controllerButtonReleased, controllerDownPressed, controllerDownReleased, controllerLeftPressed, controllerLeftReleased, controllerRightPressed, controllerRightReleased, controllerUpPressed, controllerUpReleased, inputEnded, inputStarted, isAcceptingInput, keyPressed, keyReleased, mouseClicked, mouseDragged, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, setInput
-
-
-
-
Field Detail
-
ID
public static final int ID
- See Also:
- Constant Field Values
-
keyTypeds
private static final java.util.ArrayList<KeyTyped> keyTypeds
-
notifications
private static final java.util.ArrayList<NotificationBanner> notifications
-
map
public static Map map
-
playerMenu
public static PlayerMenu playerMenu
-
dialogue
public static DialoguePanel dialogue
-
building
public static Building building
-
maps
public static java.util.ArrayList<Map> maps
-
isInventoryVisible
public static boolean isInventoryVisible
-
isDialogueVisible
public static boolean isDialogueVisible
-
canPlay
public static boolean canPlay
-
-
Method Detail
-
init
public void init(org.newdawn.slick.GameContainer container, org.newdawn.slick.state.StateBasedGame game) throws org.newdawn.slick.SlickException
- Throws:
org.newdawn.slick.SlickException
-
changeMap
public static void changeMap(int i)
Leaves the player from the current map, and enters them into the new one. All collisions are ended, then cleared.- Parameters:
i
- The index of the map to move to- See Also:
Map.onPlayerLeave()
,Map.onPlayerEnter()
-
giveQuest
public static void giveQuest(Quest quest, boolean start)
Give the player a quest- Parameters:
quest
- The quest to give the playerstart
- Whether or not to "start" the quest after giving it
-
removeQuest
public static void removeQuest(Quest quest)
Remove, or clear, a quest from the player- Parameters:
quest
- The quest to remove
-
pushNotification
public static void pushNotification(NotificationBanner notification)
Add a notification to the notification queue- Parameters:
notification
- The notification to add- See Also:
notifications
-
onNotificationFinish
public static void onNotificationFinish(NotificationBanner notification)
Remove the notification from the queue- Parameters:
notification
- The notification to remove- See Also:
notifications
-
enter
public void enter(org.newdawn.slick.GameContainer container, org.newdawn.slick.state.StateBasedGame game) throws org.newdawn.slick.SlickException
- Specified by:
enter
in interfaceorg.newdawn.slick.state.GameState
- Overrides:
enter
in classorg.newdawn.slick.state.BasicGameState
- Throws:
org.newdawn.slick.SlickException
-
leave
public void leave(org.newdawn.slick.GameContainer container, org.newdawn.slick.state.StateBasedGame game) throws org.newdawn.slick.SlickException
- Specified by:
leave
in interfaceorg.newdawn.slick.state.GameState
- Overrides:
leave
in classorg.newdawn.slick.state.BasicGameState
- Throws:
org.newdawn.slick.SlickException
-
render
public void render(org.newdawn.slick.GameContainer container, org.newdawn.slick.state.StateBasedGame game, org.newdawn.slick.Graphics graphics) throws org.newdawn.slick.SlickException
- Throws:
org.newdawn.slick.SlickException
-
update
public void update(org.newdawn.slick.GameContainer container, org.newdawn.slick.state.StateBasedGame game, int delta) throws org.newdawn.slick.SlickException
- Throws:
org.newdawn.slick.SlickException
-
getID
public int getID()
- Specified by:
getID
in interfaceorg.newdawn.slick.state.GameState
- Specified by:
getID
in classorg.newdawn.slick.state.BasicGameState
-
-