Class 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
    • 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 quest
      void 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 queue
      static void pushNotification​(NotificationBanner notification)
      Add a notification to the notification queue
      static void removeQuest​(Quest quest)
      Remove, or clear, a quest from the player
      void 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
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • keyTypeds

        private static final java.util.ArrayList<KeyTyped> keyTypeds
      • notifications

        private static final java.util.ArrayList<NotificationBanner> notifications
      • map

        public static Map map
      • 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
    • Constructor Detail

      • InGameState

        public InGameState()
    • 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 player
        start - 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 interface org.newdawn.slick.state.GameState
        Overrides:
        enter in class org.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 interface org.newdawn.slick.state.GameState
        Overrides:
        leave in class org.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 interface org.newdawn.slick.state.GameState
        Specified by:
        getID in class org.newdawn.slick.state.BasicGameState