diff --git a/.gitignore b/.gitignore index 8b01cf8..3aa0ae1 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,6 @@ jws/ # Intellij files # *.iml .idea/* -out/* \ No newline at end of file +out/* +*.metadata +*.project diff --git a/README.md b/README.md index c85c90a..6ca8446 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,15 @@ cs56-games-pokemon-map ====================== +Website: +* +* + +Javadoc: +* +* + + The goal of the program is to create a 2D Rendering engine in the style of the Pokemon games for Gameboy Advance. The engine will render the exact tileset from the actual games. Currently, after a massive architectural rewrite, the player can control Professor Oak walking around on a map. It should be relatively easy to add new features in a non-coupling way. diff --git a/build.xml b/build.xml index 24aa7e1..7ec44f5 100644 --- a/build.xml +++ b/build.xml @@ -5,7 +5,7 @@ name: Sam Baldwin for CS56, S12 --> - + @@ -13,7 +13,7 @@ - + @@ -42,7 +42,7 @@ - + @@ -65,39 +65,20 @@ - - - + - + - - javadoc written to file://${javadoc_absolute_path}/index.html - copying to ${public_javadoc_absolute_path}/index.html - - - - - - - - - - javadoc copied to ${public_javadoc_absolute_path}/index.html - TO PUBLISH: cd into that repo, then git add javadoc; - git commit -m "update javadoc"; git push origin gh-pages - - diff --git a/docs/allclasses-frame.html b/docs/allclasses-frame.html new file mode 100644 index 0000000..734e971 --- /dev/null +++ b/docs/allclasses-frame.html @@ -0,0 +1,60 @@ + + + + + +All Classes + + + + + +

All Classes

+ + + diff --git a/docs/allclasses-noframe.html b/docs/allclasses-noframe.html new file mode 100644 index 0000000..d7c6ca7 --- /dev/null +++ b/docs/allclasses-noframe.html @@ -0,0 +1,60 @@ + + + + + +All Classes + + + + + +

All Classes

+ + + diff --git a/docs/constant-values.html b/docs/constant-values.html new file mode 100644 index 0000000..f369ca6 --- /dev/null +++ b/docs/constant-values.html @@ -0,0 +1,122 @@ + + + + + +Constant Field Values + + + + + + + + + + + +
+

Constant Field Values

+

Contents

+
+ + + + + + diff --git a/docs/deprecated-list.html b/docs/deprecated-list.html new file mode 100644 index 0000000..6c4738a --- /dev/null +++ b/docs/deprecated-list.html @@ -0,0 +1,122 @@ + + + + + +Deprecated List + + + + + + + + +
+ + + + + + + +
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + + + + + + +
+ + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/Assets.html b/docs/edu/ucsb/cs56/projects/games/pokemon/Assets.html new file mode 100644 index 0000000..de4642a --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/Assets.html @@ -0,0 +1,1080 @@ + + + + + +Assets + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon
+

Class Assets

+
+
+ +
+
    +
  • +
    +
    +
    public class Assets
    +extends Object
    +
    Contains all Assets and initializes them
    +
    +
    Author:
    +
    Steven Fields
    +
    +
  • +
+
+
+ +
+
+ +
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/Game.html b/docs/edu/ucsb/cs56/projects/games/pokemon/Game.html new file mode 100644 index 0000000..2eb6bb6 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/Game.html @@ -0,0 +1,508 @@ + + + + + +Game + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon
+

Class Game

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Game

        +
        public Game()
        +
        Game constructor that simply calls the constructor of its super class, MainWindow
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        init

        +
        public void init()
        +
        Initialize all non-asset resources such as the world, the system manager, the maploader, etc.
        +
        +
        Overrides:
        +
        init in class MainWindow
        +
        +
      • +
      + + + +
        +
      • +

        load

        +
        public void load()
        +
        Load all asset resources such as textures and sound
        +
        +
        Overrides:
        +
        load in class MainWindow
        +
        +
      • +
      + + + +
        +
      • +

        update

        +
        public void update(float gameTime)
        +
        Update the game and move it forward by a delta time
        +
        +
        Overrides:
        +
        update in class MainWindow
        +
        Parameters:
        +
        gameTime - is the delta time to move the game forward
        +
        +
      • +
      + + + +
        +
      • +

        draw

        +
        public void draw(SpriteBatch spriteBatch,
        +                 float gameTime)
        +
        Draw to the screen using a sprite batch and a delta time
        +
        +
        Overrides:
        +
        draw in class MainWindow
        +
        Parameters:
        +
        spriteBatch - is the sprite batch that draws to the screen
        +
        gameTime - is the delta time to move the drawing forward
        +
        +
      • +
      + + + +
        +
      • +

        setTestMap

        +
        public static String setTestMap(String map)
        +
        +
        Parameters:
        +
        map - file destination in folders
        +
        Returns:
        +
        String data to be loaded into parser for map creation
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/IO/IOHelper.html b/docs/edu/ucsb/cs56/projects/games/pokemon/IO/IOHelper.html new file mode 100644 index 0000000..cc9f605 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/IO/IOHelper.html @@ -0,0 +1,290 @@ + + + + + +IOHelper + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.IO
+

Class IOHelper

+
+
+ +
+
    +
  • +
    +
    +
    public class IOHelper
    +extends Object
    +
    Reads characters from a string one at a time
    +
    +
    Author:
    +
    William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IOHelper

        +
        public IOHelper(String inputString)
        +
        Creates a IOHelper with a string
        +
        +
        Parameters:
        +
        inputString - the String
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        seekNext

        +
        public int seekNext(char c)
        +
        Gets the position of the next char c in the stream
        +
        +
        Parameters:
        +
        c - the char
        +
        Returns:
        +
        the next position of c
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/IO/MapLoader.html b/docs/edu/ucsb/cs56/projects/games/pokemon/IO/MapLoader.html new file mode 100644 index 0000000..8fff911 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/IO/MapLoader.html @@ -0,0 +1,284 @@ + + + + + +MapLoader + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.IO
+

Class MapLoader

+
+
+ +
+
    +
  • +
    +
    +
    public class MapLoader
    +extends Object
    +
    Loads the Map
    +
    +
    Author:
    +
    William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        MapLoader

        +
        public MapLoader()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        loadMap

        +
        public void loadMap(String inputStream,
        +                    World world)
        +
        Loads the map from a String and puts it into a world object
        +
        +
        Parameters:
        +
        inputStream - the string to read from
        +
        world - the world to load
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/IO/ReadFile.html b/docs/edu/ucsb/cs56/projects/games/pokemon/IO/ReadFile.html new file mode 100644 index 0000000..4853abe --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/IO/ReadFile.html @@ -0,0 +1,277 @@ + + + + + +ReadFile + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.IO
+

Class ReadFile

+
+
+ +
+
    +
  • +
    +
    +
    public class ReadFile
    +extends Object
    +
    Created by John Bowman on 11/8/2016.
    +
  • +
+
+
+ +
+
+ +
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/IO/TileDataLoader.html b/docs/edu/ucsb/cs56/projects/games/pokemon/IO/TileDataLoader.html new file mode 100644 index 0000000..5e20460 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/IO/TileDataLoader.html @@ -0,0 +1,240 @@ + + + + + +TileDataLoader + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.IO
+

Class TileDataLoader

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.IO.TileDataLoader
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class TileDataLoader
    +extends Object
    +
    Loads Tile Data. Currently not in use
    +
    +
    Author:
    +
    William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TileDataLoader

        +
        public TileDataLoader()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/IO/package-frame.html b/docs/edu/ucsb/cs56/projects/games/pokemon/IO/package-frame.html new file mode 100644 index 0000000..636f61e --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/IO/package-frame.html @@ -0,0 +1,23 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.IO + + + + + +

edu.ucsb.cs56.projects.games.pokemon.IO

+ + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/IO/package-summary.html b/docs/edu/ucsb/cs56/projects/games/pokemon/IO/package-summary.html new file mode 100644 index 0000000..60690e2 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/IO/package-summary.html @@ -0,0 +1,160 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.IO + + + + + + + + + + + +
+

Package edu.ucsb.cs56.projects.games.pokemon.IO

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    IOHelper +
    Reads characters from a string one at a time
    +
    MapLoader +
    Loads the Map
    +
    ReadFile +
    Created by John Bowman on 11/8/2016.
    +
    TileDataLoader +
    Loads Tile Data.
    +
    +
  • +
+
+ + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/IO/package-tree.html b/docs/edu/ucsb/cs56/projects/games/pokemon/IO/package-tree.html new file mode 100644 index 0000000..1f47d50 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/IO/package-tree.html @@ -0,0 +1,138 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.IO Class Hierarchy + + + + + + + + + + + +
+

Hierarchy For Package edu.ucsb.cs56.projects.games.pokemon.IO

+Package Hierarchies: + +
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • edu.ucsb.cs56.projects.games.pokemon.IO.IOHelper
    • +
    • edu.ucsb.cs56.projects.games.pokemon.IO.MapLoader
    • +
    • edu.ucsb.cs56.projects.games.pokemon.IO.ReadFile
    • +
    • edu.ucsb.cs56.projects.games.pokemon.IO.TileDataLoader
    • +
    +
  • +
+
+ + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/InputHandler.html b/docs/edu/ucsb/cs56/projects/games/pokemon/InputHandler.html new file mode 100644 index 0000000..ec4304d --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/InputHandler.html @@ -0,0 +1,465 @@ + + + + + +InputHandler + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon
+

Class InputHandler

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        keys

        +
        public boolean[] keys
        +
      • +
      + + + + +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        InputHandler

        +
        public InputHandler()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        updateMovement

        +
        public void updateMovement(Entity entity)
        +
        Check which keys have been pressed and enqueue a move message in the system messenger
        +
        +
        Parameters:
        +
        entity - the entity to be moved
        +
        +
      • +
      + + + +
        +
      • +

        updateInteract

        +
        public Command updateInteract(PositionComponent positionComponent,
        +                              World world)
        +
        Stub class to update a command to interact with the world
        +
        +
        Parameters:
        +
        positionComponent - the position component of the entity
        +
        world - the world where the entity resides
        +
        Returns:
        +
        returns the command to interact
        +
        +
      • +
      + + + +
        +
      • +

        keyPressed

        +
        public void keyPressed(KeyEvent e)
        +
        Checks if a key is pressed, then set that in the boolean array
        +
        +
        Specified by:
        +
        keyPressed in interface KeyListener
        +
        Parameters:
        +
        e - the KeyEvent
        +
        +
      • +
      + + + +
        +
      • +

        keyReleased

        +
        public void keyReleased(KeyEvent e)
        +
        Checks if a key is released, then set that in the boolean array
        +
        +
        Specified by:
        +
        keyReleased in interface KeyListener
        +
        Parameters:
        +
        e - the KeyEvent
        +
        +
      • +
      + + + +
        +
      • +

        keyTyped

        +
        public void keyTyped(KeyEvent e)
        +
        Checks if a key is typed, but currently only added to satisfy the key listener interface
        +
        +
        Specified by:
        +
        keyTyped in interface KeyListener
        +
        Parameters:
        +
        e - the KeyEvent
        +
        +
      • +
      + + + +
        +
      • +

        handleMessages

        +
        protected void handleMessages()
        +
        Satisfies the SystemBase extension, currently does nothing
        +
        +
        Specified by:
        +
        handleMessages in class SystemBase
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/TextBox.html b/docs/edu/ucsb/cs56/projects/games/pokemon/TextBox.html new file mode 100644 index 0000000..e77cbce --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/TextBox.html @@ -0,0 +1,324 @@ + + + + + +TextBox + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon
+

Class TextBox

+
+
+ +
+
    +
  • +
    +
    +
    public class TextBox
    +extends Object
    +
    This class doesn't do anything yet and is a basic stub for later addition for text boxes
    +
    +
    Author:
    +
    Steven Fields
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TextBox

        +
        public TextBox(String totalText)
        +
        Creates a basic text box, doesn't do anything yet
        +
        +
        Parameters:
        +
        totalText - the text to be displayed
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        advanceText

        +
        public void advanceText()
        +
        Advances the text
        +
      • +
      + + + +
        +
      • +

        getCurrentText

        +
        public String getCurrentText()
        +
        Returns the current text
        +
        +
        Returns:
        +
        the current text
        +
        +
      • +
      + + + +
        +
      • +

        isDone

        +
        public boolean isDone()
        +
        Returns if the text box is done displaying text
        +
        +
        Returns:
        +
        if the text is over
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/TileData.html b/docs/edu/ucsb/cs56/projects/games/pokemon/TileData.html new file mode 100644 index 0000000..d9d0ba9 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/TileData.html @@ -0,0 +1,360 @@ + + + + + +TileData + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon
+

Class TileData

+
+
+ +
+
    +
  • +
    +
    +
    public class TileData
    +extends Object
    +
    Class to contain TileData
    +
    +
    Author:
    +
    William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TileData

        +
        public TileData(int tileID,
        +                Texture sprite,
        +                boolean collision)
        +
        Main constructor for tile data
        +
        +
        Parameters:
        +
        tileID - the id number for the tile
        +
        sprite - the texture for the tile
        +
        collision - whether the tile is walkable on or not
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        Overrides the hashCode method of Object to return the hashCode of the tileID
        +
        +
        Overrides:
        +
        hashCode in class Object
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals(Object o)
        +
        Overrides the equal method of Object to check if the tileID is the same
        +
        +
        Overrides:
        +
        equals in class Object
        +
        Parameters:
        +
        o - the Object to compare
        +
        +
      • +
      + + + +
        +
      • +

        IDToTexture

        +
        public static Texture IDToTexture(int tileID)
        +
        Returns the texture type associated with the tileID. + + List of tile ID types: + grass_default: 0 + grass_wild: 1 + snow: 2 + water1: 3 + water2: 4 + waterN: N+2 + (Water9 is the final water type)
        +
        +
        Parameters:
        +
        tileID - the tile's ID value
        +
        Returns:
        +
        the proper Asset texture
        +
        +
      • +
      + + + +
        +
      • +

        IDToCollision

        +
        public static boolean IDToCollision(int tileID)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/Vector2.html b/docs/edu/ucsb/cs56/projects/games/pokemon/Vector2.html new file mode 100644 index 0000000..a19bdef --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/Vector2.html @@ -0,0 +1,721 @@ + + + + + +Vector2 + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon
+

Class Vector2

+
+
+ +
+
    +
  • +
    +
    +
    public class Vector2
    +extends Object
    +
    Stores an x and y value to do vector operations
    +
    +
    Author:
    +
    Steven Fields
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      floatx 
      floaty 
      static Vector2zero 
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      Vector2() +
      Constructs Vector2 at (0, 0)
      +
      Vector2(float x, + float y) +
      Constructs Vector2 at (x, y)
      +
      Vector2(Vector2 v) +
      Constructs a Vector2 at another Vector2 value
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      voidadd(float x, + float y) +
      Adds an x and y value on to our vector
      +
      voidadd(Vector2 v) +
      Adds a Vector2 on to this one
      +
      floatangle() +
      Returns the angle of this vector from the x axis
      +
      Vector2cpy() +
      Returns a copy of this vector
      +
      floatcross(float x, + float y) +
      Returns the cross product between this vector and an x and y value
      +
      floatcross(Vector2 v) +
      Returns the cross product between this vector and another Vector2
      +
      doubledistance(float x, + float y) +
      Returns the distance between this vector's head and an x and y value
      +
      doubledistance(Vector2 v) +
      Returns the distance between two vectors' heads
      +
      floatdot(float x, + float y) +
      Returns the dot product between this vector and an x and y value
      +
      floatdot(Vector2 v) +
      Returns the dot product between this vector and another Vector2
      +
      Vector2mult(float value) +
      Multiplies the vector by a scalar
      +
      voidset(float x, + float y) +
      Set the x and y value
      +
      voidset(Vector2 v) +
      Set the x and y value from a Vector2
      +
      voidsub(float x, + float y) +
      Subtracts an x and y value from our vector
      +
      voidsub(Vector2 v) +
      Subtracts a Vector2 value from our vector
      +
      StringtoString() +
      Returns this vector as a string
      +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        x

        +
        public float x
        +
      • +
      + + + +
        +
      • +

        y

        +
        public float y
        +
      • +
      + + + +
        +
      • +

        zero

        +
        public static final Vector2 zero
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Vector2

        +
        public Vector2()
        +
        Constructs Vector2 at (0, 0)
        +
      • +
      + + + +
        +
      • +

        Vector2

        +
        public Vector2(float x,
        +               float y)
        +
        Constructs Vector2 at (x, y)
        +
        +
        Parameters:
        +
        x - the x value
        +
        y - the y value
        +
        +
      • +
      + + + +
        +
      • +

        Vector2

        +
        public Vector2(Vector2 v)
        +
        Constructs a Vector2 at another Vector2 value
        +
        +
        Parameters:
        +
        v - the Vector2
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        set

        +
        public void set(float x,
        +                float y)
        +
        Set the x and y value
        +
        +
        Parameters:
        +
        x - the x value
        +
        y - the y value
        +
        +
      • +
      + + + +
        +
      • +

        set

        +
        public void set(Vector2 v)
        +
        Set the x and y value from a Vector2
        +
        +
        Parameters:
        +
        v - the Vector2
        +
        +
      • +
      + + + +
        +
      • +

        add

        +
        public void add(Vector2 v)
        +
        Adds a Vector2 on to this one
        +
        +
        Parameters:
        +
        v - the Vector2
        +
        +
      • +
      + + + +
        +
      • +

        add

        +
        public void add(float x,
        +                float y)
        +
        Adds an x and y value on to our vector
        +
        +
        Parameters:
        +
        x - the x value
        +
        y - the y value
        +
        +
      • +
      + + + +
        +
      • +

        sub

        +
        public void sub(Vector2 v)
        +
        Subtracts a Vector2 value from our vector
        +
        +
        Parameters:
        +
        v - the Vector2
        +
        +
      • +
      + + + +
        +
      • +

        sub

        +
        public void sub(float x,
        +                float y)
        +
        Subtracts an x and y value from our vector
        +
        +
        Parameters:
        +
        x - the x value
        +
        y - the y value
        +
        +
      • +
      + + + +
        +
      • +

        mult

        +
        public Vector2 mult(float value)
        +
        Multiplies the vector by a scalar
        +
        +
        Parameters:
        +
        value - the scalar
        +
        Returns:
        +
        a Vector2 multiplied by the scalar
        +
        +
      • +
      + + + +
        +
      • +

        dot

        +
        public float dot(Vector2 v)
        +
        Returns the dot product between this vector and another Vector2
        +
        +
        Parameters:
        +
        v - the Vector2
        +
        Returns:
        +
        the dot product between this and v
        +
        +
      • +
      + + + +
        +
      • +

        dot

        +
        public float dot(float x,
        +                 float y)
        +
        Returns the dot product between this vector and an x and y value
        +
        +
        Parameters:
        +
        x - the x value
        +
        y - the y value
        +
        Returns:
        +
        the dot product between this, and x and y
        +
        +
      • +
      + + + +
        +
      • +

        distance

        +
        public double distance(Vector2 v)
        +
        Returns the distance between two vectors' heads
        +
        +
        Parameters:
        +
        v - the Vector2
        +
        Returns:
        +
        the distance between the two vectors' heads
        +
        +
      • +
      + + + +
        +
      • +

        distance

        +
        public double distance(float x,
        +                       float y)
        +
        Returns the distance between this vector's head and an x and y value
        +
        +
        Parameters:
        +
        x - the x value
        +
        y - the y value
        +
        Returns:
        +
        the distance between the vector's head and x and y
        +
        +
      • +
      + + + +
        +
      • +

        cross

        +
        public float cross(Vector2 v)
        +
        Returns the cross product between this vector and another Vector2
        +
        +
        Parameters:
        +
        v - the Vector2
        +
        Returns:
        +
        the cross product between this and v
        +
        +
      • +
      + + + +
        +
      • +

        cross

        +
        public float cross(float x,
        +                   float y)
        +
        Returns the cross product between this vector and an x and y value
        +
        +
        Parameters:
        +
        x - the x value
        +
        y - the y value
        +
        Returns:
        +
        the cross product between this, and x and y.
        +
        +
      • +
      + + + +
        +
      • +

        angle

        +
        public float angle()
        +
        Returns the angle of this vector from the x axis
        +
        +
        Returns:
        +
        the angle from the x axis
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public String toString()
        +
        Returns this vector as a string
        +
        +
        Overrides:
        +
        toString in class Object
        +
        Returns:
        +
        the vector as a string
        +
        +
      • +
      + + + +
        +
      • +

        cpy

        +
        public Vector2 cpy()
        +
        Returns a copy of this vector
        +
        +
        Returns:
        +
        a copy of this vector
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/World.html b/docs/edu/ucsb/cs56/projects/games/pokemon/World.html new file mode 100644 index 0000000..dd1b0b5 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/World.html @@ -0,0 +1,407 @@ + + + + + +World + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon
+

Class World

+
+
+ +
+
    +
  • +
    +
    +
    public class World
    +extends Object
    +
    Contains tiles and NPCs as entities
    +
    +
    Author:
    +
    Steven Fields
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        tiles

        +
        public Entity[][] tiles
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        World

        +
        public World(Entity[][] tiles,
        +             HashSet<Entity> entities,
        +             InputHandler inputHandler)
        +
        Main world constructor to define tiles, entities, and the input handler
        +
        +
        Parameters:
        +
        tiles - the tile entities
        +
        entities - the entity characters
        +
        inputHandler - the main input handler
        +
        +
      • +
      + + + +
        +
      • +

        World

        +
        public World(Entity[][] tiles,
        +             InputHandler inputHandler)
        +
        World constructor that assumes an empty container of entity characters
        +
        +
        Parameters:
        +
        tiles - the tile entities
        +
        inputHandler - the main input handler
        +
        +
      • +
      + + + +
        +
      • +

        World

        +
        public World(InputHandler inputHandler)
        +
        World constructor that make empty tiles and container of entity characters
        +
        +
        Parameters:
        +
        inputHandler - the main input handler
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        addEntity

        +
        public void addEntity(Entity e)
        +
        Adds entity to the hash set
        +
        +
        Parameters:
        +
        e - the Entity
        +
        +
      • +
      + + + +
        +
      • +

        getEntities

        +
        public Entity[] getEntities()
        +
        Returns an array of the entities
        +
        +
        Returns:
        +
        array of entities
        +
        +
      • +
      + + + +
        +
      • +

        update

        +
        public void update()
        +
        Updates the world
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/commands/Command.html b/docs/edu/ucsb/cs56/projects/games/pokemon/commands/Command.html new file mode 100644 index 0000000..af47831 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/commands/Command.html @@ -0,0 +1,241 @@ + + + + + +Command + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.commands
+

Interface Command

+
+
+
+
    +
  • +
    +
    All Known Implementing Classes:
    +
    InteractCommand, MoveCommand
    +
    +
    +
    +
    public interface Command
    +
    An interface for commands
    +
    +
    Author:
    +
    Steven Fields
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        execute

        +
        void execute()
        +
      • +
      + + + +
        +
      • +

        undo

        +
        void undo()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/commands/InteractCommand.html b/docs/edu/ucsb/cs56/projects/games/pokemon/commands/InteractCommand.html new file mode 100644 index 0000000..30fd88d --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/commands/InteractCommand.html @@ -0,0 +1,365 @@ + + + + + +InteractCommand + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.commands
+

Class InteractCommand

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.commands.InteractCommand
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Command
    +
    +
    +
    +
    public class InteractCommand
    +extends Object
    +implements Command
    +
    A command to handle interaction
    +
    +
    Author:
    +
    Steven Fields
    +
    +
  • +
+
+
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        InteractCommand

        +
        public InteractCommand(PositionComponent pc,
        +                       World w)
        +
        Constructor for an InteractCommand
        +
        +
        Parameters:
        +
        pc - the PositionComponent
        +
        w - the World
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        execute

        +
        public void execute()
        +
        Executes the command
        +
        +
        Specified by:
        +
        execute in interface Command
        +
        +
      • +
      + + + +
        +
      • +

        undo

        +
        public void undo()
        +
        Undoes the last execution
        +
        +
        Specified by:
        +
        undo in interface Command
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/commands/MoveCommand.html b/docs/edu/ucsb/cs56/projects/games/pokemon/commands/MoveCommand.html new file mode 100644 index 0000000..632ee2f --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/commands/MoveCommand.html @@ -0,0 +1,378 @@ + + + + + +MoveCommand + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.commands
+

Class MoveCommand

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.commands.MoveCommand
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Command
    +
    +
    +
    +
    public class MoveCommand
    +extends Object
    +implements Command
    +
    A command to handle movement
    +
    +
    Author:
    +
    Steven Fields
    +
    +
  • +
+
+
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        MoveCommand

        +
        public MoveCommand(PositionComponent positionComponent,
        +                   Point moveTo)
        +
        Creates a move command with a position and a point to move it to
        +
        +
        Parameters:
        +
        positionComponent - the position component
        +
        moveTo - the point to move to
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        execute

        +
        public void execute()
        +
        Executes the move
        +
        +
        Specified by:
        +
        execute in interface Command
        +
        +
      • +
      + + + +
        +
      • +

        undo

        +
        public void undo()
        +
        Undoes the last move
        +
        +
        Specified by:
        +
        undo in interface Command
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/commands/package-frame.html b/docs/edu/ucsb/cs56/projects/games/pokemon/commands/package-frame.html new file mode 100644 index 0000000..17a82e4 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/commands/package-frame.html @@ -0,0 +1,25 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.commands + + + + + +

edu.ucsb.cs56.projects.games.pokemon.commands

+
+

Interfaces

+ +

Classes

+ +
+ + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/commands/package-summary.html b/docs/edu/ucsb/cs56/projects/games/pokemon/commands/package-summary.html new file mode 100644 index 0000000..6b25bca --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/commands/package-summary.html @@ -0,0 +1,165 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.commands + + + + + + + + + + + +
+

Package edu.ucsb.cs56.projects.games.pokemon.commands

+
+
+
    +
  • + + + + + + + + + + + + +
    Interface Summary 
    InterfaceDescription
    Command +
    An interface for commands
    +
    +
  • +
  • + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    InteractCommand +
    A command to handle interaction
    +
    MoveCommand +
    A command to handle movement
    +
    +
  • +
+
+ + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/commands/package-tree.html b/docs/edu/ucsb/cs56/projects/games/pokemon/commands/package-tree.html new file mode 100644 index 0000000..7d4b6b8 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/commands/package-tree.html @@ -0,0 +1,140 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.commands Class Hierarchy + + + + + + + + + + + +
+

Hierarchy For Package edu.ucsb.cs56.projects.games.pokemon.commands

+Package Hierarchies: + +
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • edu.ucsb.cs56.projects.games.pokemon.commands.InteractCommand (implements edu.ucsb.cs56.projects.games.pokemon.commands.Command)
    • +
    • edu.ucsb.cs56.projects.games.pokemon.commands.MoveCommand (implements edu.ucsb.cs56.projects.games.pokemon.commands.Command)
    • +
    +
  • +
+

Interface Hierarchy

+
    +
  • edu.ucsb.cs56.projects.games.pokemon.commands.Command
  • +
+
+ + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/components/CollisionComponent.html b/docs/edu/ucsb/cs56/projects/games/pokemon/components/CollisionComponent.html new file mode 100644 index 0000000..7920f46 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/components/CollisionComponent.html @@ -0,0 +1,360 @@ + + + + + +CollisionComponent + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.components
+

Class CollisionComponent

+
+
+ +
+
    +
  • +
    +
    +
    public class CollisionComponent
    +extends Component
    +
    A component for handling collision of entities
    +
    +
    Author:
    +
    John Bowman + + created 11/17/2016
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        hasCollision

        +
        public boolean hasCollision
        +
      • +
      + + + +
        +
      • +

        width

        +
        public int width
        +
      • +
      + + + +
        +
      • +

        height

        +
        public int height
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CollisionComponent

        +
        public CollisionComponent(boolean objectHasCollision,
        +                          int objectWidth,
        +                          int objectHeight)
        +
        Creates a CollisionComponent from a boolean value, width, and height + The entity's hitbox is constructed elsewhere using the width and height values
        +
        +
        Parameters:
        +
        objectHasCollision - true if the entity is collideable, false if not
        +
        objectWidth - width of the entity
        +
        objectHeight - height of the entity
        +
        +
      • +
      + + + +
        +
      • +

        CollisionComponent

        +
        public CollisionComponent(boolean objectHasCollision,
        +                          Rectangle bounds)
        +
        Creates a CollisionComponent from a boolean value and the width/height values + of a Rectangle
        +
        +
        Parameters:
        +
        objectHasCollision - true if the entity is collideable, false if not
        +
        bounds - The bounds of the entity's rectangular hitbox
        +
        +
      • +
      + + + +
        +
      • +

        CollisionComponent

        +
        public CollisionComponent()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/components/Component.html b/docs/edu/ucsb/cs56/projects/games/pokemon/components/Component.html new file mode 100644 index 0000000..ba40795 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/components/Component.html @@ -0,0 +1,244 @@ + + + + + +Component + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.components
+

Class Component

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.components.Component
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Component

        +
        public Component()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/components/ControllableComponent.html b/docs/edu/ucsb/cs56/projects/games/pokemon/components/ControllableComponent.html new file mode 100644 index 0000000..eebd78b --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/components/ControllableComponent.html @@ -0,0 +1,288 @@ + + + + + +ControllableComponent + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.components
+

Class ControllableComponent

+
+
+ +
+
    +
  • +
    +
    +
    public class ControllableComponent
    +extends Component
    +
    A component to control a entity
    +
    +
    Author:
    +
    Steven Fields
    +
    +
  • +
+
+
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ControllableComponent

        +
        public ControllableComponent(Controller controller)
        +
        Construcst a controllable component from a controller
        +
        +
        Parameters:
        +
        controller - the Controller
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/components/Controller.html b/docs/edu/ucsb/cs56/projects/games/pokemon/components/Controller.html new file mode 100644 index 0000000..6ee6c0d --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/components/Controller.html @@ -0,0 +1,274 @@ + + + + + +Controller + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.components
+

Class Controller

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.components.Controller
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Controller

        +
        public Controller()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        update

        +
        public abstract void update()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/components/Entity.html b/docs/edu/ucsb/cs56/projects/games/pokemon/components/Entity.html new file mode 100644 index 0000000..cab4ef5 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/components/Entity.html @@ -0,0 +1,347 @@ + + + + + +Entity + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.components
+

Class Entity

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.components.Entity
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class Entity
    +extends Object
    +
    A class to hold components that make up an entity
    +
    +
    Author:
    +
    Steven Fields, William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Entity

        +
        public Entity()
        +
        Creates an entity with no components
        +
      • +
      + + + +
        +
      • +

        Entity

        +
        public Entity(ArrayList<Component> components)
        +
        Creates an entity with components
        +
        +
        Parameters:
        +
        components - the ArrayList of components
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getComponents

        +
        public ArrayList<Component> getComponents()
        +
        Returns the ArrayList of components
        +
        +
        Returns:
        +
        the ArrayList of components
        +
        +
      • +
      + + + +
        +
      • +

        getComponent

        +
        public Component getComponent(Class type)
        +
        Returns a specific component in the entity
        +
        +
        Parameters:
        +
        type - the Class of the component
        +
        Returns:
        +
        the Component
        +
        +
      • +
      + + + +
        +
      • +

        addComponent

        +
        public Entity addComponent(Component comp)
        +
        Adds a component, can be chained
        +
        +
        Parameters:
        +
        comp - the Component
        +
        Returns:
        +
        this Entity
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/components/GraphicsComponent.html b/docs/edu/ucsb/cs56/projects/games/pokemon/components/GraphicsComponent.html new file mode 100644 index 0000000..15c1d13 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/components/GraphicsComponent.html @@ -0,0 +1,307 @@ + + + + + +GraphicsComponent + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.components
+

Class GraphicsComponent

+
+
+ +
+
    +
  • +
    +
    +
    public class GraphicsComponent
    +extends Component
    +
    A component to handle graphics of the entity
    +
    +
    Author:
    +
    Steven Fields, William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        GraphicsComponent

        +
        public GraphicsComponent(Texture texture)
        +
        Constructs a graphics component from a static texture
        +
        +
        Parameters:
        +
        texture - the Texture
        +
        +
      • +
      + + + +
        +
      • +

        GraphicsComponent

        +
        public GraphicsComponent(Animation animation)
        +
        Constructs a graphcis component from an Animation
        +
        +
        Parameters:
        +
        animation - the Animation
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/components/MovementComponent.Direction.html b/docs/edu/ucsb/cs56/projects/games/pokemon/components/MovementComponent.Direction.html new file mode 100644 index 0000000..488a088 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/components/MovementComponent.Direction.html @@ -0,0 +1,379 @@ + + + + + +MovementComponent.Direction + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.components
+

Enum MovementComponent.Direction

+
+
+ +
+ +
+
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static MovementComponent.Direction[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (MovementComponent.Direction c : MovementComponent.Direction.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static MovementComponent.Direction valueOf(String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        IllegalArgumentException - if this enum type has no constant with the specified name
        +
        NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/components/MovementComponent.html b/docs/edu/ucsb/cs56/projects/games/pokemon/components/MovementComponent.html new file mode 100644 index 0000000..95d964b --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/components/MovementComponent.html @@ -0,0 +1,348 @@ + + + + + +MovementComponent + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.components
+

Class MovementComponent

+
+
+ +
+
    +
  • +
    +
    +
    public class MovementComponent
    +extends Component
    +
    A component to handle movement of the entity
    +
    +
    Author:
    +
    William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        MovementComponent

        +
        public MovementComponent(Vector2 velocity)
        +
        Constructs a movement component from a Vector2
        +
        +
        Parameters:
        +
        velocity - the Vector2
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getDirection

        +
        public MovementComponent.Direction getDirection()
        +
        Returns one of four Directions that the Entity is facing
        +
        +
        Returns:
        +
        the Direction the entity is facing
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/components/PlayerController.html b/docs/edu/ucsb/cs56/projects/games/pokemon/components/PlayerController.html new file mode 100644 index 0000000..523c78d --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/components/PlayerController.html @@ -0,0 +1,296 @@ + + + + + +PlayerController + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.components
+

Class PlayerController

+
+
+ +
+
    +
  • +
    +
    +
    public class PlayerController
    +extends Controller
    +
    A class to control a Player
    +
    +
    Author:
    +
    Steven Fields
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        PlayerController

        +
        public PlayerController(Entity entity,
        +                        World world,
        +                        InputHandler inputHandler)
        +
        Creates a player controller
        +
        +
        Parameters:
        +
        entity - the entity to control
        +
        world - the world the entity resides in
        +
        inputHandler - the input handler
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        update

        +
        public void update()
        +
        +
        Specified by:
        +
        update in class Controller
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/components/PokemonController.html b/docs/edu/ucsb/cs56/projects/games/pokemon/components/PokemonController.html new file mode 100644 index 0000000..afb2781 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/components/PokemonController.html @@ -0,0 +1,293 @@ + + + + + +PokemonController + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.components
+

Class PokemonController

+
+
+ +
+
    +
  • +
    +
    +
    public class PokemonController
    +extends Controller
    +
    A class to control a specific pokemon entity
    +
    +
    Author:
    +
    Steven Fields
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        PokemonController

        +
        public PokemonController(Entity entity,
        +                         InputHandler inputHandler)
        +
        Creates a pokemon controller
        +
        +
        Parameters:
        +
        entity - the pokemon to control
        +
        inputHandler - the input handler
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        update

        +
        public void update()
        +
        +
        Specified by:
        +
        update in class Controller
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/components/PositionComponent.html b/docs/edu/ucsb/cs56/projects/games/pokemon/components/PositionComponent.html new file mode 100644 index 0000000..876273f --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/components/PositionComponent.html @@ -0,0 +1,370 @@ + + + + + +PositionComponent + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.components
+

Class PositionComponent

+
+
+ +
+
    +
  • +
    +
    +
    public class PositionComponent
    +extends Component
    +
    A component for the position of the entity
    +
    +
    Author:
    +
    Steven Fields
    +
    +
  • +
+
+
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        PositionComponent

        +
        public PositionComponent(int x,
        +                         int y,
        +                         Vector2 offset)
        +
        Creates a postition component from an x and y value and a offset
        +
        +
        Parameters:
        +
        x - the x value
        +
        y - the y value
        +
        offset - the Vector2 for offset
        +
        +
      • +
      + + + +
        +
      • +

        PositionComponent

        +
        public PositionComponent(Point position,
        +                         Vector2 offset)
        +
        Creates a position component from a point and a offset
        +
        +
        Parameters:
        +
        position - the Point
        +
        offset - the Vector2 for offset
        +
        +
      • +
      + + + +
        +
      • +

        PositionComponent

        +
        public PositionComponent(int x,
        +                         int y)
        +
        Creates a position component from a x and y value with a offset of 0, 0
        +
        +
        Parameters:
        +
        x - the x value
        +
        y - the y value
        +
        +
      • +
      + + + +
        +
      • +

        PositionComponent

        +
        public PositionComponent(Point position)
        +
        Creates a position component from a Point with a offset of 0, 0
        +
        +
        Parameters:
        +
        position - the Point
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/components/TileComponent.html b/docs/edu/ucsb/cs56/projects/games/pokemon/components/TileComponent.html new file mode 100644 index 0000000..92421e2 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/components/TileComponent.html @@ -0,0 +1,288 @@ + + + + + +TileComponent + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.components
+

Class TileComponent

+
+
+ +
+
    +
  • +
    +
    +
    public class TileComponent
    +extends Component
    +
    A component for a tile
    +
    +
    Author:
    +
    William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        ID

        +
        public int ID
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TileComponent

        +
        public TileComponent(int ID)
        +
        Constructs a tile component with an ID
        +
        +
        Parameters:
        +
        ID - the tile ID
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/components/package-frame.html b/docs/edu/ucsb/cs56/projects/games/pokemon/components/package-frame.html new file mode 100644 index 0000000..3367067 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/components/package-frame.html @@ -0,0 +1,34 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.components + + + + + +

edu.ucsb.cs56.projects.games.pokemon.components

+ + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/components/package-summary.html b/docs/edu/ucsb/cs56/projects/games/pokemon/components/package-summary.html new file mode 100644 index 0000000..ed32994 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/components/package-summary.html @@ -0,0 +1,217 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.components + + + + + + + + + + + +
+

Package edu.ucsb.cs56.projects.games.pokemon.components

+
+
+ +
+ + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/components/package-tree.html b/docs/edu/ucsb/cs56/projects/games/pokemon/components/package-tree.html new file mode 100644 index 0000000..c054c95 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/components/package-tree.html @@ -0,0 +1,163 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.components Class Hierarchy + + + + + + + + + + + +
+

Hierarchy For Package edu.ucsb.cs56.projects.games.pokemon.components

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Enum Hierarchy

+ +
+ + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/factories/BuildingFactory.html b/docs/edu/ucsb/cs56/projects/games/pokemon/factories/BuildingFactory.html new file mode 100644 index 0000000..33d8e85 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/factories/BuildingFactory.html @@ -0,0 +1,285 @@ + + + + + +BuildingFactory + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.factories
+

Class BuildingFactory

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.factories.BuildingFactory
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class BuildingFactory
    +extends Object
    +
    Created by John Bowman on 11/8/2016.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        BuildingFactory

        +
        public BuildingFactory()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        constructBuildingEntity

        +
        public static Entity constructBuildingEntity(String buildingType,
        +                                             int x,
        +                                             int y)
        +
        Creates and adds a building entity to the world, built with the specifications you give it.
        +
        +
        Parameters:
        +
        buildingType - The type of building you wish to create
        +
        x: - New building's X coordinate
        +
        y: - New Building's Y coordinate
        +
        Returns:
        +
        the new constructed building entity
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/factories/ObstacleFactory.html b/docs/edu/ucsb/cs56/projects/games/pokemon/factories/ObstacleFactory.html new file mode 100644 index 0000000..8135044 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/factories/ObstacleFactory.html @@ -0,0 +1,288 @@ + + + + + +ObstacleFactory + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.factories
+

Class ObstacleFactory

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.factories.ObstacleFactory
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class ObstacleFactory
    +extends Object
    +
    Created by John Bowman on 11/16/2016.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ObstacleFactory

        +
        public ObstacleFactory()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        constructObstacleEntity

        +
        public static Entity constructObstacleEntity(String obstacleType,
        +                                             int x,
        +                                             int y)
        +
        Creates and adds an obstacle entity to the world, built with the specifications you give it. + + This has been made separate from the BuildingFactory to account for the possibility of a future + Group that might want to create the ability to enter buildings and load a new map.
        +
        +
        Parameters:
        +
        obstacleType - The type of building you wish to create
        +
        x: - New building's X coordinate
        +
        y: - New Building's Y coordinate
        +
        Returns:
        +
        the new constructed obstacle entity
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/factories/package-frame.html b/docs/edu/ucsb/cs56/projects/games/pokemon/factories/package-frame.html new file mode 100644 index 0000000..d2a8622 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/factories/package-frame.html @@ -0,0 +1,21 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.factories + + + + + +

edu.ucsb.cs56.projects.games.pokemon.factories

+ + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/factories/package-summary.html b/docs/edu/ucsb/cs56/projects/games/pokemon/factories/package-summary.html new file mode 100644 index 0000000..a3cab7b --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/factories/package-summary.html @@ -0,0 +1,148 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.factories + + + + + + + + + + + +
+

Package edu.ucsb.cs56.projects.games.pokemon.factories

+
+
+
    +
  • + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    BuildingFactory +
    Created by John Bowman on 11/8/2016.
    +
    ObstacleFactory +
    Created by John Bowman on 11/16/2016.
    +
    +
  • +
+
+ + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/factories/package-tree.html b/docs/edu/ucsb/cs56/projects/games/pokemon/factories/package-tree.html new file mode 100644 index 0000000..5c58a03 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/factories/package-tree.html @@ -0,0 +1,136 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.factories Class Hierarchy + + + + + + + + + + + +
+

Hierarchy For Package edu.ucsb.cs56.projects.games.pokemon.factories

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/framework/Main.html b/docs/edu/ucsb/cs56/projects/games/pokemon/framework/Main.html new file mode 100644 index 0000000..bcf96c7 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/framework/Main.html @@ -0,0 +1,281 @@ + + + + + +Main + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.framework
+

Class Main

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.framework.Main
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class Main
    +extends Object
    +
    Starting point for the game. Creates a MainWindow
    +
    +
    Author:
    +
    Samuel Baldwin, Marcus Liou, Alec Harrell
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Main

        +
        public Main()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        main

        +
        public static void main(String[] args)
        +
        The starting point for the pokemon map game
        +
        +
        Parameters:
        +
        args - array of arguments, no use
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/framework/MainWindow.html b/docs/edu/ucsb/cs56/projects/games/pokemon/framework/MainWindow.html new file mode 100644 index 0000000..7d4b46e --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/framework/MainWindow.html @@ -0,0 +1,544 @@ + + + + + +MainWindow + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.framework
+

Class MainWindow

+
+
+ +
+ +
+
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        MainWindow

        +
        public MainWindow()
        +
        Constructs the main window
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        run

        +
        public void run()
        +
        Starts running the program
        +
      • +
      + + + +
        +
      • +

        init

        +
        protected void init()
        +
        Initializes game logic code
        +
      • +
      + + + +
        +
      • +

        load

        +
        protected void load()
        +
        Loads game assets
        +
      • +
      + + + +
        +
      • +

        setMap

        +
        protected static void setMap(String map)
        +
        Sets the map
        +
        +
        Parameters:
        +
        map - the loaded map's string data to be converted + into the visual map
        +
        +
      • +
      + + + +
        +
      • +

        update

        +
        protected void update(float gameTime)
        +
        Moves the game forward a delta time and updates it
        +
        +
        Parameters:
        +
        gameTime - the delta time
        +
        +
      • +
      + + + +
        +
      • +

        draw

        +
        protected void draw(SpriteBatch spriteBatch,
        +                    float gameTime)
        +
        Moves the rendeering forward a delta time and draws to the screen
        +
        +
        Parameters:
        +
        spriteBatch - the SpriteBatch that draws to the screen
        +
        gameTime - the delta time
        +
        +
      • +
      + + + + +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/framework/Pair.html b/docs/edu/ucsb/cs56/projects/games/pokemon/framework/Pair.html new file mode 100644 index 0000000..8428936 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/framework/Pair.html @@ -0,0 +1,368 @@ + + + + + +Pair + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.framework
+

Class Pair<T,U>

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.framework.Pair<T,U>
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class Pair<T,U>
    +extends Object
    +
    A data structure for a pair
    +
    +
    Author:
    +
    William Bennett
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      Tfirst 
      Usecond 
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      Pair(T first, + U second) +
      Takes two references and stores them as pairs
      +
      +
    • +
    + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        first

        +
        public T first
        +
      • +
      + + + +
        +
      • +

        second

        +
        public U second
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + + + +
        +
      • +

        Pair

        +
        public Pair(T first,
        +            U second)
        +
        Takes two references and stores them as pairs
        +
        +
        Parameters:
        +
        first - the first object
        +
        second - the second object
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        equals

        +
        public boolean equals(Object o)
        +
        Checks if the two pairs are equal by seeing if the corresponding first and second pairs are the same
        +
        +
        Overrides:
        +
        equals in class Object
        +
        Parameters:
        +
        o - the second pair
        +
        Returns:
        +
        if they are equal
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        Gives a unique hash code
        +
        +
        Overrides:
        +
        hashCode in class Object
        +
        Returns:
        +
        a hash code
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/framework/Ref.html b/docs/edu/ucsb/cs56/projects/games/pokemon/framework/Ref.html new file mode 100644 index 0000000..403b00b --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/framework/Ref.html @@ -0,0 +1,290 @@ + + + + + +Ref + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.framework
+

Class Ref<T>

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.framework.Ref<T>
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class Ref<T>
    +extends Object
    +
    A data structure for a reference
    +
    +
    Author:
    +
    William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        reference

        +
        public T reference
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Ref

        +
        public Ref()
        +
      • +
      + + + + + +
        +
      • +

        Ref

        +
        public Ref(T object)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/framework/package-frame.html b/docs/edu/ucsb/cs56/projects/games/pokemon/framework/package-frame.html new file mode 100644 index 0000000..737cc76 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/framework/package-frame.html @@ -0,0 +1,23 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.framework + + + + + +

edu.ucsb.cs56.projects.games.pokemon.framework

+
+

Classes

+ +
+ + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/framework/package-summary.html b/docs/edu/ucsb/cs56/projects/games/pokemon/framework/package-summary.html new file mode 100644 index 0000000..e7a8bb1 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/framework/package-summary.html @@ -0,0 +1,160 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.framework + + + + + + + + + + + +
+

Package edu.ucsb.cs56.projects.games.pokemon.framework

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    Main +
    Starting point for the game.
    +
    MainWindow +
    The window frame for the Pokemon map game
    +
    Pair<T,U> +
    A data structure for a pair
    +
    Ref<T> +
    A data structure for a reference
    +
    +
  • +
+
+ + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/framework/package-tree.html b/docs/edu/ucsb/cs56/projects/games/pokemon/framework/package-tree.html new file mode 100644 index 0000000..ee54b24 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/framework/package-tree.html @@ -0,0 +1,154 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.framework Class Hierarchy + + + + + + + + + + + +
+

Hierarchy For Package edu.ucsb.cs56.projects.games.pokemon.framework

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/Animation.html b/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/Animation.html new file mode 100644 index 0000000..6ae2442 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/Animation.html @@ -0,0 +1,382 @@ + + + + + +Animation + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.graphics
+

Class Animation

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.graphics.Animation
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class Animation
    +extends Object
    +
    A class to store and handle animation
    +
    +
    Author:
    +
    William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Animation

        +
        public Animation(Texture texture)
        +
        Creates an animation with a single texture
        +
        +
        Parameters:
        +
        texture - the texture
        +
        +
      • +
      + + + +
        +
      • +

        Animation

        +
        public Animation(AnimationFrame[] animationList)
        +
        Creates an animation from an array of frames
        +
        +
        Parameters:
        +
        animationList - the array of frames
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        currentFrame

        +
        public Texture currentFrame()
        +
        Gives the current frame
        +
        +
        Returns:
        +
        the current frame
        +
        +
      • +
      + + + +
        +
      • +

        advance

        +
        public void advance(float timeDelta,
        +                    MovementComponent direction)
        +
        Moves the animation forward by a delta time
        +
        +
        Parameters:
        +
        timeDelta - the delta time
        +
        direction - the direction the character is moving
        +
        +
      • +
      + + + +
        +
      • +

        runOnce

        +
        public void runOnce()
        +
      • +
      + + + +
        +
      • +

        run

        +
        public void run()
        +
      • +
      + + + +
        +
      • +

        freeze

        +
        public void freeze()
        +
      • +
      + + + +
        +
      • +

        halt

        +
        public void halt()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/AnimationFrame.html b/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/AnimationFrame.html new file mode 100644 index 0000000..e588bb2 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/AnimationFrame.html @@ -0,0 +1,385 @@ + + + + + +AnimationFrame + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.graphics
+

Class AnimationFrame

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.graphics.AnimationFrame
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class AnimationFrame
    +extends Object
    +
    A single animation frame
    +
    +
    Author:
    +
    William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        texture

        +
        public final Texture texture
        +
      • +
      + + + +
        +
      • +

        frameLength

        +
        public final float frameLength
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        AnimationFrame

        +
        public AnimationFrame(Texture texture)
        +
        Creates an animation frame from a texture, assumes 1 frame length long
        +
        +
        Parameters:
        +
        texture - the texture
        +
        +
      • +
      + + + +
        +
      • +

        AnimationFrame

        +
        public AnimationFrame(Texture texture,
        +                      float frameLength)
        +
        Creates an animation frame from a texture and a frame length
        +
        +
        Parameters:
        +
        texture - the texture
        +
        frameLength - the frame length
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        equals

        +
        public boolean equals(Object o)
        +
        Checks if two Animation frames are equal dependent on their texture and frame length
        +
        +
        Overrides:
        +
        equals in class Object
        +
        Parameters:
        +
        o - the AnimationFrame
        +
        Returns:
        +
        if the two frames are equal
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        Returns a unique hash code for a animation frame
        +
        +
        Overrides:
        +
        hashCode in class Object
        +
        Returns:
        +
        a hash code
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/SpriteBatch.html b/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/SpriteBatch.html new file mode 100644 index 0000000..6108bd6 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/SpriteBatch.html @@ -0,0 +1,334 @@ + + + + + +SpriteBatch + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.graphics
+

Class SpriteBatch

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.graphics.SpriteBatch
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class SpriteBatch
    +extends Object
    +
    A sprite batch to handle drawing
    +
    +
    Author:
    +
    William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SpriteBatch

        +
        public SpriteBatch(Image image)
        +
        Creates a sprite batch with a image
        +
        +
        Parameters:
        +
        image - the image
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        draw

        +
        public void draw(Texture texture,
        +                 Point position)
        +
        Draws a texture to the screen at a specific position
        +
        +
        Parameters:
        +
        texture - the texture
        +
        position - the position
        +
        +
      • +
      + + + +
        +
      • +

        draw

        +
        public void draw(Texture texture,
        +                 Rectangle destRect)
        +
        Draws a texture to the screen at a specific rectangle
        +
        +
        Parameters:
        +
        texture - the texture
        +
        destRect - the rectangle
        +
        +
      • +
      + + + +
        +
      • +

        getBackBuffer

        +
        public Image getBackBuffer()
        +
        Retrieves the image in the back buffer
        +
        +
        Returns:
        +
        the backBuffer
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/Texture.html b/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/Texture.html new file mode 100644 index 0000000..55868e1 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/Texture.html @@ -0,0 +1,462 @@ + + + + + +Texture + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.graphics
+

Class Texture

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.graphics.Texture
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class Texture
    +extends Object
    +
    The class for objects of type Texture.
    +
    +
    Author:
    +
    Steven Fields, William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Texture

        +
        public Texture(BufferedImage tileSheet,
        +               Rectangle bounds)
        +
        Creates a texture from a tile sheet and a rectangle of its position
        +
        +
        Parameters:
        +
        tileSheet - the tile sheet
        +
        bounds - the bounds of the texture
        +
        +
      • +
      + + + +
        +
      • +

        Texture

        +
        public Texture(BufferedImage tileSheet,
        +               int x,
        +               int y,
        +               int width,
        +               int height)
        +
        Creates a texture from a tile sheet and its x, y value on the sheet, and its width and height
        +
        +
        Parameters:
        +
        tileSheet - the tile sheet
        +
        x - the x value
        +
        y - the y value
        +
        width - the width
        +
        height - the height
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getTileSheet

        +
        public BufferedImage getTileSheet()
        +
        Returns the tile sheet
        +
        +
        Returns:
        +
        the tile sheet
        +
        +
      • +
      + + + +
        +
      • +

        srcRect

        +
        public Rectangle srcRect()
        +
        Returns the bounds of the texture
        +
        +
        Returns:
        +
        the bounds
        +
        +
      • +
      + + + +
        +
      • +

        width

        +
        public int width()
        +
        Returns the width
        +
        +
        Returns:
        +
        the width
        +
        +
      • +
      + + + +
        +
      • +

        height

        +
        public int height()
        +
        Returns the height
        +
        +
        Returns:
        +
        height
        +
        +
      • +
      + + + +
        +
      • +

        srcX1

        +
        public int srcX1()
        +
        Returns the x coordinate in the left of the texture
        +
        +
        Returns:
        +
        the first x value
        +
        +
      • +
      + + + +
        +
      • +

        srcX2

        +
        public int srcX2()
        +
        Returns the x coordinate on the right of the texture
        +
        +
        Returns:
        +
        the second x value
        +
        +
      • +
      + + + +
        +
      • +

        srcY1

        +
        public int srcY1()
        +
        Returns the y value on the top of the texture
        +
        +
        Returns:
        +
        the first y value
        +
        +
      • +
      + + + +
        +
      • +

        srcY2

        +
        public int srcY2()
        +
        Returns the y value on the bottom of the texture
        +
        +
        Returns:
        +
        the second y value
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/package-frame.html b/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/package-frame.html new file mode 100644 index 0000000..172ab52 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/package-frame.html @@ -0,0 +1,23 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.graphics + + + + + +

edu.ucsb.cs56.projects.games.pokemon.graphics

+ + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/package-summary.html b/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/package-summary.html new file mode 100644 index 0000000..f6947ab --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/package-summary.html @@ -0,0 +1,160 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.graphics + + + + + + + + + + + +
+

Package edu.ucsb.cs56.projects.games.pokemon.graphics

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    Animation +
    A class to store and handle animation
    +
    AnimationFrame +
    A single animation frame
    +
    SpriteBatch +
    A sprite batch to handle drawing
    +
    Texture +
    The class for objects of type Texture.
    +
    +
  • +
+
+ + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/package-tree.html b/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/package-tree.html new file mode 100644 index 0000000..2ca20b5 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/graphics/package-tree.html @@ -0,0 +1,138 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.graphics Class Hierarchy + + + + + + + + + + + +
+

Hierarchy For Package edu.ucsb.cs56.projects.games.pokemon.graphics

+Package Hierarchies: + +
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • edu.ucsb.cs56.projects.games.pokemon.graphics.Animation
    • +
    • edu.ucsb.cs56.projects.games.pokemon.graphics.AnimationFrame
    • +
    • edu.ucsb.cs56.projects.games.pokemon.graphics.SpriteBatch
    • +
    • edu.ucsb.cs56.projects.games.pokemon.graphics.Texture
    • +
    +
  • +
+
+ + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/package-frame.html b/docs/edu/ucsb/cs56/projects/games/pokemon/package-frame.html new file mode 100644 index 0000000..837a893 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/package-frame.html @@ -0,0 +1,26 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon + + + + + +

edu.ucsb.cs56.projects.games.pokemon

+ + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/package-summary.html b/docs/edu/ucsb/cs56/projects/games/pokemon/package-summary.html new file mode 100644 index 0000000..75cf4be --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/package-summary.html @@ -0,0 +1,178 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon + + + + + + + + + + + +
+

Package edu.ucsb.cs56.projects.games.pokemon

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    Assets +
    Contains all Assets and initializes them
    +
    Game +
    Put ALL game logic in this class, or in objects rooted in this class
    +
    InputHandler +
    Handles the input
    +
    TextBox +
    This class doesn't do anything yet and is a basic stub for later addition for text boxes
    +
    TileData +
    Class to contain TileData
    +
    Vector2 +
    Stores an x and y value to do vector operations
    +
    World +
    Contains tiles and NPCs as entities
    +
    +
  • +
+
+ + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/package-tree.html b/docs/edu/ucsb/cs56/projects/games/pokemon/package-tree.html new file mode 100644 index 0000000..f112d2e --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/package-tree.html @@ -0,0 +1,165 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon Class Hierarchy + + + + + + + + + + + +
+

Hierarchy For Package edu.ucsb.cs56.projects.games.pokemon

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/systems/MovementSystem.html b/docs/edu/ucsb/cs56/projects/games/pokemon/systems/MovementSystem.html new file mode 100644 index 0000000..4f6e1f2 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/systems/MovementSystem.html @@ -0,0 +1,362 @@ + + + + + +MovementSystem + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.systems
+

Class MovementSystem

+
+
+ +
+
    +
  • +
    +
    +
    public class MovementSystem
    +extends SystemBase
    +
    Handles all movement
    +
    +
    Author:
    +
    William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        MovementSystem

        +
        public MovementSystem()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        applyMovement

        +
        public void applyMovement(float deltaT,
        +                          World world)
        +
        Handles movement and applies it a delta time forward
        +
        +
        Parameters:
        +
        deltaT - the delta time
        +
        world - the world
        +
        +
      • +
      + + + +
        +
      • +

        overLaps

        +
        public boolean overLaps(PositionComponent PC1,
        +                        MovementComponent MC1,
        +                        Entity[] entities,
        +                        Entity[][] tiles)
        +
        A method to check to see if one entity overlaps another
        +
        +
        Parameters:
        +
        PC1 - the position component of the moving object
        +
        MC1 - the movement component of the moving object
        +
        entities - the list of the world's entities
        +
        tiles - the array of tiles in the world
        +
        Returns:
        +
        a boolean that determines whether an entity overlaps another entity with collision
        +
        +
      • +
      + + + +
        +
      • +

        handleMessages

        +
        protected void handleMessages()
        +
        Handles the message for a movement change
        +
        +
        Specified by:
        +
        handleMessages in class SystemBase
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/systems/RenderSystem.html b/docs/edu/ucsb/cs56/projects/games/pokemon/systems/RenderSystem.html new file mode 100644 index 0000000..e9c4093 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/systems/RenderSystem.html @@ -0,0 +1,338 @@ + + + + + +RenderSystem + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.systems
+

Class RenderSystem

+
+
+ +
+
    +
  • +
    +
    +
    public class RenderSystem
    +extends SystemBase
    +
    Handles all rendering
    +
    +
    Author:
    +
    William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        RenderSystem

        +
        public RenderSystem(Rectangle cameraBounds)
        +
        Creates a render system with camera bounds
        +
        +
        Parameters:
        +
        cameraBounds - the camera bounds
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        draw

        +
        public void draw(SpriteBatch spriteBatch,
        +                 World world)
        +
        Draws the elements to the screen with a SpriteBatch
        +
        +
        Parameters:
        +
        spriteBatch - the SpriteBatch
        +
        world - the world
        +
        +
      • +
      + + + +
        +
      • +

        handleMessages

        +
        protected void handleMessages()
        +
        Handles messages for the render system
        +
        +
        Specified by:
        +
        handleMessages in class SystemBase
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/systems/SystemBase.html b/docs/edu/ucsb/cs56/projects/games/pokemon/systems/SystemBase.html new file mode 100644 index 0000000..1078e85 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/systems/SystemBase.html @@ -0,0 +1,334 @@ + + + + + +SystemBase + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.systems
+

Class SystemBase

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.systems.SystemBase
    • +
    +
  • +
+
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    InputHandler, MovementSystem, RenderSystem
    +
    +
    +
    +
    public abstract class SystemBase
    +extends Object
    +
    Abstract class for all classes that use System messages
    +
    +
    Author:
    +
    William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SystemBase

        +
        public SystemBase()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        registerMessenger

        +
        public void registerMessenger(SystemMessenger messenger)
        +
        Registers a messenger
        +
        +
        Parameters:
        +
        messenger - the messenger
        +
        +
      • +
      + + + +
        +
      • +

        handleMessages

        +
        protected abstract void handleMessages()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/systems/SystemMessage.html b/docs/edu/ucsb/cs56/projects/games/pokemon/systems/SystemMessage.html new file mode 100644 index 0000000..4228720 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/systems/SystemMessage.html @@ -0,0 +1,322 @@ + + + + + +SystemMessage + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.systems
+

Class SystemMessage

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.systems.SystemMessage
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class SystemMessage
    +extends Object
    +
    Stores data on a subject and a message to be applied to the subject
    +
    +
    Author:
    +
    William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        subject

        +
        public Entity subject
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SystemMessage

        +
        public SystemMessage(Entity subject,
        +                     Pair<String,Object> message)
        +
        Creates a system message with a subject (Entity) and a message (Pair)
        +
        +
        Parameters:
        +
        subject - the subject
        +
        message - the message
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getMessage

        +
        public boolean getMessage(String message,
        +                          Ref<Object> reference)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/systems/SystemMessenger.html b/docs/edu/ucsb/cs56/projects/games/pokemon/systems/SystemMessenger.html new file mode 100644 index 0000000..1cf1944 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/systems/SystemMessenger.html @@ -0,0 +1,360 @@ + + + + + +SystemMessenger + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.systems
+

Class SystemMessenger

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.systems.SystemMessenger
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class SystemMessenger
    +extends Object
    +
    Stores system messages to be handled
    +
    +
    Author:
    +
    William Bennett
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SystemMessenger

        +
        public SystemMessenger()
        +
        Creates a SystemMessenger
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        dequeue

        +
        public SystemMessage dequeue()
        +
        Dequeues the next SystemMessage
        +
        +
        Returns:
        +
        the dequeued SystemMessage
        +
        +
      • +
      + + + +
        +
      • +

        peek

        +
        public SystemMessage peek()
        +
        Peeks the next SystemMessage, but does not dequeue
        +
        +
        Returns:
        +
        the peeked SystemMessage
        +
        +
      • +
      + + + +
        +
      • +

        enqueue

        +
        public void enqueue(SystemMessage message)
        +
        Enqueues a SystemMessage
        +
        +
        Parameters:
        +
        message - the SystemMessage
        +
        +
      • +
      + + + +
        +
      • +

        merge

        +
        public void merge()
        +
        Merges the front buffer and back buffer
        +
      • +
      + + + +
        +
      • +

        isEmpty

        +
        public boolean isEmpty()
        +
        Returns if the front buffer is empty
        +
        +
        Returns:
        +
        if the front buffer is empty
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/systems/package-frame.html b/docs/edu/ucsb/cs56/projects/games/pokemon/systems/package-frame.html new file mode 100644 index 0000000..a1849d2 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/systems/package-frame.html @@ -0,0 +1,24 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.systems + + + + + +

edu.ucsb.cs56.projects.games.pokemon.systems

+ + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/systems/package-summary.html b/docs/edu/ucsb/cs56/projects/games/pokemon/systems/package-summary.html new file mode 100644 index 0000000..84c6446 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/systems/package-summary.html @@ -0,0 +1,166 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.systems + + + + + + + + + + + +
+

Package edu.ucsb.cs56.projects.games.pokemon.systems

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    MovementSystem +
    Handles all movement
    +
    RenderSystem +
    Handles all rendering
    +
    SystemBase +
    Abstract class for all classes that use System messages
    +
    SystemMessage +
    Stores data on a subject and a message to be applied to the subject
    +
    SystemMessenger +
    Stores system messages to be handled
    +
    +
  • +
+
+ + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/systems/package-tree.html b/docs/edu/ucsb/cs56/projects/games/pokemon/systems/package-tree.html new file mode 100644 index 0000000..3da55b6 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/systems/package-tree.html @@ -0,0 +1,142 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.systems Class Hierarchy + + + + + + + + + + + +
+

Hierarchy For Package edu.ucsb.cs56.projects.games.pokemon.systems

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/tests/Vector2Test.html b/docs/edu/ucsb/cs56/projects/games/pokemon/tests/Vector2Test.html new file mode 100644 index 0000000..6d1709f --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/tests/Vector2Test.html @@ -0,0 +1,322 @@ + + + + + +Vector2Test + + + + + + + + + + + + +
+
edu.ucsb.cs56.projects.games.pokemon.tests
+

Class Vector2Test

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • edu.ucsb.cs56.projects.games.pokemon.tests.Vector2Test
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class Vector2Test
    +extends Object
    +
    Created by William Bennett on 7/27/2016.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Vector2Test

        +
        public Vector2Test()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        testNoArgConstructor

        +
        public void testNoArgConstructor()
        +
      • +
      + + + +
        +
      • +

        test2ArgConstructor

        +
        public void test2ArgConstructor()
        +
      • +
      + + + +
        +
      • +

        testAdd

        +
        public void testAdd()
        +
      • +
      + + + +
        +
      • +

        testSubtract

        +
        public void testSubtract()
        +
      • +
      + + + +
        +
      • +

        testMult

        +
        public void testMult()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/tests/package-frame.html b/docs/edu/ucsb/cs56/projects/games/pokemon/tests/package-frame.html new file mode 100644 index 0000000..921a916 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/tests/package-frame.html @@ -0,0 +1,20 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.tests + + + + + +

edu.ucsb.cs56.projects.games.pokemon.tests

+
+

Classes

+ +
+ + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/tests/package-summary.html b/docs/edu/ucsb/cs56/projects/games/pokemon/tests/package-summary.html new file mode 100644 index 0000000..eb260d3 --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/tests/package-summary.html @@ -0,0 +1,142 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.tests + + + + + + + + + + + +
+

Package edu.ucsb.cs56.projects.games.pokemon.tests

+
+
+
    +
  • + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    Vector2Test +
    Created by William Bennett on 7/27/2016.
    +
    +
  • +
+
+ + + + + + diff --git a/docs/edu/ucsb/cs56/projects/games/pokemon/tests/package-tree.html b/docs/edu/ucsb/cs56/projects/games/pokemon/tests/package-tree.html new file mode 100644 index 0000000..6e4603e --- /dev/null +++ b/docs/edu/ucsb/cs56/projects/games/pokemon/tests/package-tree.html @@ -0,0 +1,135 @@ + + + + + +edu.ucsb.cs56.projects.games.pokemon.tests Class Hierarchy + + + + + + + + + + + +
+

Hierarchy For Package edu.ucsb.cs56.projects.games.pokemon.tests

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/help-doc.html b/docs/help-doc.html new file mode 100644 index 0000000..e9366af --- /dev/null +++ b/docs/help-doc.html @@ -0,0 +1,223 @@ + + + + + +API Help + + + + + + + + +
+ + + + + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
    +
  • +

    Overview

    +

    The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

    +
  • +
  • +

    Package

    +

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    +
      +
    • Interfaces (italic)
    • +
    • Classes
    • +
    • Enums
    • +
    • Exceptions
    • +
    • Errors
    • +
    • Annotation Types
    • +
    +
  • +
  • +

    Class/Interface

    +

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
      +
    • Class inheritance diagram
    • +
    • Direct Subclasses
    • +
    • All Known Subinterfaces
    • +
    • All Known Implementing Classes
    • +
    • Class/interface declaration
    • +
    • Class/interface description
    • +
    +
      +
    • Nested Class Summary
    • +
    • Field Summary
    • +
    • Constructor Summary
    • +
    • Method Summary
    • +
    +
      +
    • Field Detail
    • +
    • Constructor Detail
    • +
    • Method Detail
    • +
    +

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    +
  • +
  • +

    Annotation Type

    +

    Each annotation type has its own separate page with the following sections:

    +
      +
    • Annotation Type declaration
    • +
    • Annotation Type description
    • +
    • Required Element Summary
    • +
    • Optional Element Summary
    • +
    • Element Detail
    • +
    +
  • +
  • +

    Enum

    +

    Each enum has its own separate page with the following sections:

    +
      +
    • Enum declaration
    • +
    • Enum description
    • +
    • Enum Constant Summary
    • +
    • Enum Constant Detail
    • +
    +
  • +
  • +

    Tree (Class Hierarchy)

    +

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    +
      +
    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • +
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
    • +
    +
  • +
  • +

    Deprecated API

    +

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    +
  • +
  • +

    Index

    +

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

    +
  • +
  • +

    Prev/Next

    +

    These links take you to the next or previous class, interface, package, or related page.

    +
  • +
  • +

    Frames/No Frames

    +

    These links show and hide the HTML frames. All pages are available with or without frames.

    +
  • +
  • +

    All Classes

    +

    The All Classes link shows all classes and interfaces except non-static nested types.

    +
  • +
  • +

    Serialized Form

    +

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    +
  • +
  • +

    Constant Field Values

    +

    The Constant Field Values page lists the static final fields and their values.

    +
  • +
+This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index-all.html b/docs/index-all.html new file mode 100644 index 0000000..c0f37c4 --- /dev/null +++ b/docs/index-all.html @@ -0,0 +1,1194 @@ + + + + + +Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I K L M N O P R S T U V W X Y Z  + + +

A

+
+
add(Vector2) - Method in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Adds a Vector2 on to this one
+
+
add(float, float) - Method in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Adds an x and y value on to our vector
+
+
addComponent(Component) - Method in class edu.ucsb.cs56.projects.games.pokemon.components.Entity
+
+
Adds a component, can be chained
+
+
addEntity(Entity) - Method in class edu.ucsb.cs56.projects.games.pokemon.World
+
+
Adds entity to the hash set
+
+
addKeyListener(KeyListener) - Method in class edu.ucsb.cs56.projects.games.pokemon.framework.MainWindow
+
 
+
advance(float, MovementComponent) - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.Animation
+
+
Moves the animation forward by a delta time
+
+
advanceText() - Method in class edu.ucsb.cs56.projects.games.pokemon.TextBox
+
+
Advances the text
+
+
angle() - Method in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Returns the angle of this vector from the x axis
+
+
animation - Variable in class edu.ucsb.cs56.projects.games.pokemon.components.GraphicsComponent
+
 
+
Animation - Class in edu.ucsb.cs56.projects.games.pokemon.graphics
+
+
A class to store and handle animation
+
+
Animation(Texture) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.graphics.Animation
+
+
Creates an animation with a single texture
+
+
Animation(AnimationFrame[]) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.graphics.Animation
+
+
Creates an animation from an array of frames
+
+
AnimationFrame - Class in edu.ucsb.cs56.projects.games.pokemon.graphics
+
+
A single animation frame
+
+
AnimationFrame(Texture) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.graphics.AnimationFrame
+
+
Creates an animation frame from a texture, assumes 1 frame length long
+
+
AnimationFrame(Texture, float) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.graphics.AnimationFrame
+
+
Creates an animation frame from a texture and a frame length
+
+
applyMovement(float, World) - Method in class edu.ucsb.cs56.projects.games.pokemon.systems.MovementSystem
+
+
Handles movement and applies it a delta time forward
+
+
Assets - Class in edu.ucsb.cs56.projects.games.pokemon
+
+
Contains all Assets and initializes them
+
+
Assets() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
+ + + +

B

+
+
beforeMove - Variable in class edu.ucsb.cs56.projects.games.pokemon.commands.MoveCommand
+
 
+
bigBuilding2Left - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
bigBuilding2Right - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
bigBuildingLeft - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
bigBuildingRight - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
bigFish - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
bigPokemon - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
bigRock - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
BuildingFactory - Class in edu.ucsb.cs56.projects.games.pokemon.factories
+
+
Created by John Bowman on 11/8/2016.
+
+
BuildingFactory() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.factories.BuildingFactory
+
 
+
+ + + +

C

+
+
CollisionComponent - Class in edu.ucsb.cs56.projects.games.pokemon.components
+
+
A component for handling collision of entities
+
+
CollisionComponent(boolean, int, int) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.CollisionComponent
+
+
Creates a CollisionComponent from a boolean value, width, and height + The entity's hitbox is constructed elsewhere using the width and height values
+
+
CollisionComponent(boolean, Rectangle) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.CollisionComponent
+
+
Creates a CollisionComponent from a boolean value and the width/height values + of a Rectangle
+
+
CollisionComponent() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.CollisionComponent
+
 
+
Command - Interface in edu.ucsb.cs56.projects.games.pokemon.commands
+
+
An interface for commands
+
+
Component - Class in edu.ucsb.cs56.projects.games.pokemon.components
+
+
Component is a abstract class that allow you to define a part of an entity
+
+
Component() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.Component
+
 
+
constructBuildingEntity(String, int, int) - Static method in class edu.ucsb.cs56.projects.games.pokemon.factories.BuildingFactory
+
+
Creates and adds a building entity to the world, built with the specifications you give it.
+
+
constructObstacleEntity(String, int, int) - Static method in class edu.ucsb.cs56.projects.games.pokemon.factories.ObstacleFactory
+
+
Creates and adds an obstacle entity to the world, built with the specifications you give it.
+
+
ControllableComponent - Class in edu.ucsb.cs56.projects.games.pokemon.components
+
+
A component to control a entity
+
+
ControllableComponent(Controller) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.ControllableComponent
+
+
Construcst a controllable component from a controller
+
+
controller - Variable in class edu.ucsb.cs56.projects.games.pokemon.components.ControllableComponent
+
 
+
Controller - Class in edu.ucsb.cs56.projects.games.pokemon.components
+
+
An abstract class to define a controller
+
+
Controller() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.Controller
+
 
+
cpy() - Method in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Returns a copy of this vector
+
+
cross(Vector2) - Method in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Returns the cross product between this vector and another Vector2
+
+
cross(float, float) - Method in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Returns the cross product between this vector and an x and y value
+
+
currentFrame() - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.Animation
+
+
Gives the current frame
+
+
+ + + +

D

+
+
dequeue() - Method in class edu.ucsb.cs56.projects.games.pokemon.systems.SystemMessenger
+
+
Dequeues the next SystemMessage
+
+
distance(Vector2) - Method in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Returns the distance between two vectors' heads
+
+
distance(float, float) - Method in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Returns the distance between this vector's head and an x and y value
+
+
door - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
dot(Vector2) - Method in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Returns the dot product between this vector and another Vector2
+
+
dot(float, float) - Method in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Returns the dot product between this vector and an x and y value
+
+
draw(SpriteBatch, float) - Method in class edu.ucsb.cs56.projects.games.pokemon.framework.MainWindow
+
+
Moves the rendeering forward a delta time and draws to the screen
+
+
draw(SpriteBatch, float) - Method in class edu.ucsb.cs56.projects.games.pokemon.Game
+
+
Draw to the screen using a sprite batch and a delta time
+
+
draw(Texture, Point) - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.SpriteBatch
+
+
Draws a texture to the screen at a specific position
+
+
draw(Texture, Rectangle) - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.SpriteBatch
+
+
Draws a texture to the screen at a specific rectangle
+
+
draw(SpriteBatch, World) - Method in class edu.ucsb.cs56.projects.games.pokemon.systems.RenderSystem
+
+
Draws the elements to the screen with a SpriteBatch
+
+
+ + + +

E

+
+
edu.ucsb.cs56.projects.games.pokemon - package edu.ucsb.cs56.projects.games.pokemon
+
 
+
edu.ucsb.cs56.projects.games.pokemon.commands - package edu.ucsb.cs56.projects.games.pokemon.commands
+
 
+
edu.ucsb.cs56.projects.games.pokemon.components - package edu.ucsb.cs56.projects.games.pokemon.components
+
 
+
edu.ucsb.cs56.projects.games.pokemon.factories - package edu.ucsb.cs56.projects.games.pokemon.factories
+
 
+
edu.ucsb.cs56.projects.games.pokemon.framework - package edu.ucsb.cs56.projects.games.pokemon.framework
+
 
+
edu.ucsb.cs56.projects.games.pokemon.graphics - package edu.ucsb.cs56.projects.games.pokemon.graphics
+
 
+
edu.ucsb.cs56.projects.games.pokemon.IO - package edu.ucsb.cs56.projects.games.pokemon.IO
+
 
+
edu.ucsb.cs56.projects.games.pokemon.systems - package edu.ucsb.cs56.projects.games.pokemon.systems
+
 
+
edu.ucsb.cs56.projects.games.pokemon.tests - package edu.ucsb.cs56.projects.games.pokemon.tests
+
 
+
enqueue(SystemMessage) - Method in class edu.ucsb.cs56.projects.games.pokemon.systems.SystemMessenger
+
+
Enqueues a SystemMessage
+
+
Entity - Class in edu.ucsb.cs56.projects.games.pokemon.components
+
+
A class to hold components that make up an entity
+
+
Entity() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.Entity
+
+
Creates an entity with no components
+
+
Entity(ArrayList<Component>) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.Entity
+
+
Creates an entity with components
+
+
equals(Object) - Method in class edu.ucsb.cs56.projects.games.pokemon.framework.Pair
+
+
Checks if the two pairs are equal by seeing if the corresponding first and second pairs are the same
+
+
equals(Object) - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.AnimationFrame
+
+
Checks if two Animation frames are equal dependent on their texture and frame length
+
+
equals(Object) - Method in class edu.ucsb.cs56.projects.games.pokemon.TileData
+
+
Overrides the equal method of Object to check if the tileID is the same
+
+
execute() - Method in interface edu.ucsb.cs56.projects.games.pokemon.commands.Command
+
 
+
execute() - Method in class edu.ucsb.cs56.projects.games.pokemon.commands.InteractCommand
+
+
Executes the command
+
+
execute() - Method in class edu.ucsb.cs56.projects.games.pokemon.commands.MoveCommand
+
+
Executes the move
+
+
+ + + +

F

+
+
first - Variable in class edu.ucsb.cs56.projects.games.pokemon.framework.Pair
+
 
+
flower - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
flower2 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
flower3 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
frameLength - Variable in class edu.ucsb.cs56.projects.games.pokemon.graphics.AnimationFrame
+
 
+
freeze() - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.Animation
+
 
+
+ + + +

G

+
+
Game - Class in edu.ucsb.cs56.projects.games.pokemon
+
+
Put ALL game logic in this class, or in objects rooted in this class
+
+
Game() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.Game
+
+
Game constructor that simply calls the constructor of its super class, MainWindow
+
+
getBackBuffer() - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.SpriteBatch
+
+
Retrieves the image in the back buffer
+
+
getComponent(Class) - Method in class edu.ucsb.cs56.projects.games.pokemon.components.Entity
+
+
Returns a specific component in the entity
+
+
getComponents() - Method in class edu.ucsb.cs56.projects.games.pokemon.components.Entity
+
+
Returns the ArrayList of components
+
+
getCurrentText() - Method in class edu.ucsb.cs56.projects.games.pokemon.TextBox
+
+
Returns the current text
+
+
getDirection() - Method in class edu.ucsb.cs56.projects.games.pokemon.components.MovementComponent
+
+
Returns one of four Directions that the Entity is facing
+
+
getEntities() - Method in class edu.ucsb.cs56.projects.games.pokemon.World
+
+
Returns an array of the entities
+
+
getMessage(String, Ref<Object>) - Method in class edu.ucsb.cs56.projects.games.pokemon.systems.SystemMessage
+
 
+
getTexture(String) - Static method in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
getTileSheet() - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.Texture
+
+
Returns the tile sheet
+
+
god - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
GraphicsComponent - Class in edu.ucsb.cs56.projects.games.pokemon.components
+
+
A component to handle graphics of the entity
+
+
GraphicsComponent(Texture) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.GraphicsComponent
+
+
Constructs a graphics component from a static texture
+
+
GraphicsComponent(Animation) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.GraphicsComponent
+
+
Constructs a graphcis component from an Animation
+
+
grass_Default - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
grass_Wild - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
+ + + +

H

+
+
halt() - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.Animation
+
 
+
handleMessages() - Method in class edu.ucsb.cs56.projects.games.pokemon.InputHandler
+
+
Satisfies the SystemBase extension, currently does nothing
+
+
handleMessages() - Method in class edu.ucsb.cs56.projects.games.pokemon.systems.MovementSystem
+
+
Handles the message for a movement change
+
+
handleMessages() - Method in class edu.ucsb.cs56.projects.games.pokemon.systems.RenderSystem
+
+
Handles messages for the render system
+
+
handleMessages() - Method in class edu.ucsb.cs56.projects.games.pokemon.systems.SystemBase
+
 
+
hasCollision - Variable in class edu.ucsb.cs56.projects.games.pokemon.components.CollisionComponent
+
 
+
hashCode() - Method in class edu.ucsb.cs56.projects.games.pokemon.framework.Pair
+
+
Gives a unique hash code
+
+
hashCode() - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.AnimationFrame
+
+
Returns a unique hash code for a animation frame
+
+
hashCode() - Method in class edu.ucsb.cs56.projects.games.pokemon.TileData
+
+
Overrides the hashCode method of Object to return the hashCode of the tileID
+
+
height - Variable in class edu.ucsb.cs56.projects.games.pokemon.components.CollisionComponent
+
 
+
height() - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.Texture
+
+
Returns the height
+
+
+ + + +

I

+
+
ID - Variable in class edu.ucsb.cs56.projects.games.pokemon.components.TileComponent
+
 
+
IDToCollision(int) - Static method in class edu.ucsb.cs56.projects.games.pokemon.TileData
+
 
+
IDToTexture(int) - Static method in class edu.ucsb.cs56.projects.games.pokemon.TileData
+
+
Returns the texture type associated with the tileID.
+
+
init() - Method in class edu.ucsb.cs56.projects.games.pokemon.framework.MainWindow
+
+
Initializes game logic code
+
+
init() - Method in class edu.ucsb.cs56.projects.games.pokemon.Game
+
+
Initialize all non-asset resources such as the world, the system manager, the maploader, etc.
+
+
initAssets() - Static method in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
+
Initializes the assets
+
+
InputHandler - Class in edu.ucsb.cs56.projects.games.pokemon
+
+
Handles the input
+
+
InputHandler() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.InputHandler
+
 
+
InteractCommand - Class in edu.ucsb.cs56.projects.games.pokemon.commands
+
+
A command to handle interaction
+
+
InteractCommand(PositionComponent, World) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.commands.InteractCommand
+
+
Constructor for an InteractCommand
+
+
IOHelper - Class in edu.ucsb.cs56.projects.games.pokemon.IO
+
+
Reads characters from a string one at a time
+
+
IOHelper(String) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.IO.IOHelper
+
+
Creates a IOHelper with a string
+
+
isDone() - Method in class edu.ucsb.cs56.projects.games.pokemon.TextBox
+
+
Returns if the text box is done displaying text
+
+
isEmpty() - Method in class edu.ucsb.cs56.projects.games.pokemon.systems.SystemMessenger
+
+
Returns if the front buffer is empty
+
+
+ + + +

K

+
+
keyPressed(KeyEvent) - Method in class edu.ucsb.cs56.projects.games.pokemon.InputHandler
+
+
Checks if a key is pressed, then set that in the boolean array
+
+
keyReleased(KeyEvent) - Method in class edu.ucsb.cs56.projects.games.pokemon.InputHandler
+
+
Checks if a key is released, then set that in the boolean array
+
+
keys - Variable in class edu.ucsb.cs56.projects.games.pokemon.InputHandler
+
 
+
keyTyped(KeyEvent) - Method in class edu.ucsb.cs56.projects.games.pokemon.InputHandler
+
+
Checks if a key is typed, but currently only added to satisfy the key listener interface
+
+
+ + + +

L

+
+
largeHouse - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
load() - Method in class edu.ucsb.cs56.projects.games.pokemon.framework.MainWindow
+
+
Loads game assets
+
+
load() - Method in class edu.ucsb.cs56.projects.games.pokemon.Game
+
+
Load all asset resources such as textures and sound
+
+
loadMap(String, World) - Method in class edu.ucsb.cs56.projects.games.pokemon.IO.MapLoader
+
+
Loads the map from a String and puts it into a world object
+
+
+ + + +

M

+
+
Main - Class in edu.ucsb.cs56.projects.games.pokemon.framework
+
+
Starting point for the game.
+
+
Main() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.framework.Main
+
 
+
main(String[]) - Static method in class edu.ucsb.cs56.projects.games.pokemon.framework.Main
+
+
The starting point for the pokemon map game
+
+
MainWindow - Class in edu.ucsb.cs56.projects.games.pokemon.framework
+
+
The window frame for the Pokemon map game
+
+
MainWindow() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.framework.MainWindow
+
+
Constructs the main window
+
+
MapLoader - Class in edu.ucsb.cs56.projects.games.pokemon.IO
+
+
Loads the Map
+
+
MapLoader() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.IO.MapLoader
+
 
+
mediumHouse - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
merge() - Method in class edu.ucsb.cs56.projects.games.pokemon.systems.SystemMessenger
+
+
Merges the front buffer and back buffer
+
+
messenger - Variable in class edu.ucsb.cs56.projects.games.pokemon.systems.SystemBase
+
 
+
MoveCommand - Class in edu.ucsb.cs56.projects.games.pokemon.commands
+
+
A command to handle movement
+
+
MoveCommand(PositionComponent, Point) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.commands.MoveCommand
+
+
Creates a move command with a position and a point to move it to
+
+
moveCommand - Variable in class edu.ucsb.cs56.projects.games.pokemon.InputHandler
+
 
+
MovementComponent - Class in edu.ucsb.cs56.projects.games.pokemon.components
+
+
A component to handle movement of the entity
+
+
MovementComponent(Vector2) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.MovementComponent
+
+
Constructs a movement component from a Vector2
+
+
MovementComponent.Direction - Enum in edu.ucsb.cs56.projects.games.pokemon.components
+
 
+
MovementSystem - Class in edu.ucsb.cs56.projects.games.pokemon.systems
+
+
Handles all movement
+
+
MovementSystem() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.systems.MovementSystem
+
 
+
moveTo - Variable in class edu.ucsb.cs56.projects.games.pokemon.commands.MoveCommand
+
 
+
mult(float) - Method in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Multiplies the vector by a scalar
+
+
+ + + +

N

+
+
niceTree - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
+ + + +

O

+
+
ObstacleFactory - Class in edu.ucsb.cs56.projects.games.pokemon.factories
+
+
Created by John Bowman on 11/16/2016.
+
+
ObstacleFactory() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.factories.ObstacleFactory
+
 
+
offset - Variable in class edu.ucsb.cs56.projects.games.pokemon.components.PositionComponent
+
 
+
overLaps(PositionComponent, MovementComponent, Entity[], Entity[][]) - Method in class edu.ucsb.cs56.projects.games.pokemon.systems.MovementSystem
+
+
A method to check to see if one entity overlaps another
+
+
+ + + +

P

+
+
Pair<T,U> - Class in edu.ucsb.cs56.projects.games.pokemon.framework
+
+
A data structure for a pair
+
+
Pair(T, U) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.framework.Pair
+
+
Takes two references and stores them as pairs
+
+
pc - Variable in class edu.ucsb.cs56.projects.games.pokemon.commands.InteractCommand
+
 
+
peek() - Method in class edu.ucsb.cs56.projects.games.pokemon.systems.SystemMessenger
+
+
Peeks the next SystemMessage, but does not dequeue
+
+
player0 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player0f - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player1 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player10 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player10f - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player11 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player11f - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player1f - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player2 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player2f - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player3 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player3f - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player4 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player4f - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player5 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player5f - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player6 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player6f - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player7 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player7f - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player8 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player8f - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player9 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
player9f - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
playerAnimation - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
PlayerController - Class in edu.ucsb.cs56.projects.games.pokemon.components
+
+
A class to control a Player
+
+
PlayerController(Entity, World, InputHandler) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.PlayerController
+
+
Creates a player controller
+
+
pokeball - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
pokecenter - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
pokemart - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
PokemonController - Class in edu.ucsb.cs56.projects.games.pokemon.components
+
+
A class to control a specific pokemon entity
+
+
PokemonController(Entity, InputHandler) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.PokemonController
+
+
Creates a pokemon controller
+
+
position - Variable in class edu.ucsb.cs56.projects.games.pokemon.components.PositionComponent
+
 
+
positionComponent - Variable in class edu.ucsb.cs56.projects.games.pokemon.commands.MoveCommand
+
 
+
PositionComponent - Class in edu.ucsb.cs56.projects.games.pokemon.components
+
+
A component for the position of the entity
+
+
PositionComponent(int, int, Vector2) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.PositionComponent
+
+
Creates a postition component from an x and y value and a offset
+
+
PositionComponent(Point, Vector2) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.PositionComponent
+
+
Creates a position component from a point and a offset
+
+
PositionComponent(int, int) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.PositionComponent
+
+
Creates a position component from a x and y value with a offset of 0, 0
+
+
PositionComponent(Point) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.PositionComponent
+
+
Creates a position component from a Point with a offset of 0, 0
+
+
+ + + +

R

+
+
ReadFile - Class in edu.ucsb.cs56.projects.games.pokemon.IO
+
+
Created by John Bowman on 11/8/2016.
+
+
ReadFile() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.IO.ReadFile
+
 
+
readFile(String, Charset) - Static method in class edu.ucsb.cs56.projects.games.pokemon.IO.ReadFile
+
 
+
Ref<T> - Class in edu.ucsb.cs56.projects.games.pokemon.framework
+
+
A data structure for a reference
+
+
Ref() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.framework.Ref
+
 
+
Ref(T) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.framework.Ref
+
 
+
reference - Variable in class edu.ucsb.cs56.projects.games.pokemon.framework.Ref
+
 
+
registerMessenger(SystemMessenger) - Method in class edu.ucsb.cs56.projects.games.pokemon.systems.SystemBase
+
+
Registers a messenger
+
+
RenderSystem - Class in edu.ucsb.cs56.projects.games.pokemon.systems
+
+
Handles all rendering
+
+
RenderSystem(Rectangle) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.systems.RenderSystem
+
+
Creates a render system with camera bounds
+
+
rock - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
run() - Method in class edu.ucsb.cs56.projects.games.pokemon.framework.MainWindow
+
+
Starts running the program
+
+
run() - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.Animation
+
 
+
runOnce() - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.Animation
+
 
+
+ + + +

S

+
+
second - Variable in class edu.ucsb.cs56.projects.games.pokemon.framework.Pair
+
 
+
seekNext(char) - Method in class edu.ucsb.cs56.projects.games.pokemon.IO.IOHelper
+
+
Gets the position of the next char c in the stream
+
+
set(float, float) - Method in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Set the x and y value
+
+
set(Vector2) - Method in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Set the x and y value from a Vector2
+
+
setMap(String) - Static method in class edu.ucsb.cs56.projects.games.pokemon.framework.MainWindow
+
+
Sets the map
+
+
setTestMap(String) - Static method in class edu.ucsb.cs56.projects.games.pokemon.Game
+
 
+
smallHouse - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
snow - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
spriteBatch - Variable in class edu.ucsb.cs56.projects.games.pokemon.framework.MainWindow
+
 
+
SpriteBatch - Class in edu.ucsb.cs56.projects.games.pokemon.graphics
+
+
A sprite batch to handle drawing
+
+
SpriteBatch(Image) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.graphics.SpriteBatch
+
+
Creates a sprite batch with a image
+
+
srcRect() - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.Texture
+
+
Returns the bounds of the texture
+
+
srcX1() - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.Texture
+
+
Returns the x coordinate in the left of the texture
+
+
srcX2() - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.Texture
+
+
Returns the x coordinate on the right of the texture
+
+
srcY1() - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.Texture
+
+
Returns the y value on the top of the texture
+
+
srcY2() - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.Texture
+
+
Returns the y value on the bottom of the texture
+
+
sub(Vector2) - Method in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Subtracts a Vector2 value from our vector
+
+
sub(float, float) - Method in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Subtracts an x and y value from our vector
+
+
subject - Variable in class edu.ucsb.cs56.projects.games.pokemon.systems.SystemMessage
+
 
+
SystemBase - Class in edu.ucsb.cs56.projects.games.pokemon.systems
+
+
Abstract class for all classes that use System messages
+
+
SystemBase() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.systems.SystemBase
+
 
+
SystemMessage - Class in edu.ucsb.cs56.projects.games.pokemon.systems
+
+
Stores data on a subject and a message to be applied to the subject
+
+
SystemMessage(Entity, Pair<String, Object>) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.systems.SystemMessage
+
+
Creates a system message with a subject (Entity) and a message (Pair)
+
+
SystemMessenger - Class in edu.ucsb.cs56.projects.games.pokemon.systems
+
+
Stores system messages to be handled
+
+
SystemMessenger() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.systems.SystemMessenger
+
+
Creates a SystemMessenger
+
+
+ + + +

T

+
+
test2ArgConstructor() - Method in class edu.ucsb.cs56.projects.games.pokemon.tests.Vector2Test
+
 
+
testAdd() - Method in class edu.ucsb.cs56.projects.games.pokemon.tests.Vector2Test
+
 
+
testMult() - Method in class edu.ucsb.cs56.projects.games.pokemon.tests.Vector2Test
+
 
+
testNoArgConstructor() - Method in class edu.ucsb.cs56.projects.games.pokemon.tests.Vector2Test
+
 
+
testSubtract() - Method in class edu.ucsb.cs56.projects.games.pokemon.tests.Vector2Test
+
 
+
textBox - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
TextBox - Class in edu.ucsb.cs56.projects.games.pokemon
+
+
This class doesn't do anything yet and is a basic stub for later addition for text boxes
+
+
TextBox(String) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.TextBox
+
+
Creates a basic text box, doesn't do anything yet
+
+
texture - Variable in class edu.ucsb.cs56.projects.games.pokemon.graphics.AnimationFrame
+
 
+
Texture - Class in edu.ucsb.cs56.projects.games.pokemon.graphics
+
+
The class for objects of type Texture.
+
+
Texture(BufferedImage, Rectangle) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.graphics.Texture
+
+
Creates a texture from a tile sheet and a rectangle of its position
+
+
Texture(BufferedImage, int, int, int, int) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.graphics.Texture
+
+
Creates a texture from a tile sheet and its x, y value on the sheet, and its width and height
+
+
TileComponent - Class in edu.ucsb.cs56.projects.games.pokemon.components
+
+
A component for a tile
+
+
TileComponent(int) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.components.TileComponent
+
+
Constructs a tile component with an ID
+
+
TileData - Class in edu.ucsb.cs56.projects.games.pokemon
+
+
Class to contain TileData
+
+
TileData(int, Texture, boolean) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.TileData
+
+
Main constructor for tile data
+
+
TileDataLoader - Class in edu.ucsb.cs56.projects.games.pokemon.IO
+
+
Loads Tile Data.
+
+
TileDataLoader() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.IO.TileDataLoader
+
 
+
tiles - Variable in class edu.ucsb.cs56.projects.games.pokemon.World
+
 
+
toString() - Method in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Returns this vector as a string
+
+
tree - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
+ + + +

U

+
+
undo() - Method in interface edu.ucsb.cs56.projects.games.pokemon.commands.Command
+
 
+
undo() - Method in class edu.ucsb.cs56.projects.games.pokemon.commands.InteractCommand
+
+
Undoes the last execution
+
+
undo() - Method in class edu.ucsb.cs56.projects.games.pokemon.commands.MoveCommand
+
+
Undoes the last move
+
+
update() - Method in class edu.ucsb.cs56.projects.games.pokemon.components.Controller
+
 
+
update() - Method in class edu.ucsb.cs56.projects.games.pokemon.components.PlayerController
+
 
+
update() - Method in class edu.ucsb.cs56.projects.games.pokemon.components.PokemonController
+
 
+
update(float) - Method in class edu.ucsb.cs56.projects.games.pokemon.framework.MainWindow
+
+
Moves the game forward a delta time and updates it
+
+
update(float) - Method in class edu.ucsb.cs56.projects.games.pokemon.Game
+
+
Update the game and move it forward by a delta time
+
+
update() - Method in class edu.ucsb.cs56.projects.games.pokemon.World
+
+
Updates the world
+
+
updateInteract(PositionComponent, World) - Method in class edu.ucsb.cs56.projects.games.pokemon.InputHandler
+
+
Stub class to update a command to interact with the world
+
+
updateMovement(Entity) - Method in class edu.ucsb.cs56.projects.games.pokemon.InputHandler
+
+
Check which keys have been pressed and enqueue a move message in the system messenger
+
+
+ + + +

V

+
+
valueOf(String) - Static method in enum edu.ucsb.cs56.projects.games.pokemon.components.MovementComponent.Direction
+
+
Returns the enum constant of this type with the specified name.
+
+
values() - Static method in enum edu.ucsb.cs56.projects.games.pokemon.components.MovementComponent.Direction
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
Vector2 - Class in edu.ucsb.cs56.projects.games.pokemon
+
+
Stores an x and y value to do vector operations
+
+
Vector2() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Constructs Vector2 at (0, 0)
+
+
Vector2(float, float) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Constructs Vector2 at (x, y)
+
+
Vector2(Vector2) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
+
Constructs a Vector2 at another Vector2 value
+
+
Vector2Test - Class in edu.ucsb.cs56.projects.games.pokemon.tests
+
+
Created by William Bennett on 7/27/2016.
+
+
Vector2Test() - Constructor for class edu.ucsb.cs56.projects.games.pokemon.tests.Vector2Test
+
 
+
velocity - Variable in class edu.ucsb.cs56.projects.games.pokemon.components.MovementComponent
+
 
+
+ + + +

W

+
+
w - Variable in class edu.ucsb.cs56.projects.games.pokemon.commands.InteractCommand
+
 
+
water1 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
water2 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
water3 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
water4 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
water5 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
water6 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
water7 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
water8 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
water9 - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Assets
+
 
+
width - Variable in class edu.ucsb.cs56.projects.games.pokemon.components.CollisionComponent
+
 
+
width() - Method in class edu.ucsb.cs56.projects.games.pokemon.graphics.Texture
+
+
Returns the width
+
+
World - Class in edu.ucsb.cs56.projects.games.pokemon
+
+
Contains tiles and NPCs as entities
+
+
World(Entity[][], HashSet<Entity>, InputHandler) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.World
+
+
Main world constructor to define tiles, entities, and the input handler
+
+
World(Entity[][], InputHandler) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.World
+
+
World constructor that assumes an empty container of entity characters
+
+
World(InputHandler) - Constructor for class edu.ucsb.cs56.projects.games.pokemon.World
+
+
World constructor that make empty tiles and container of entity characters
+
+
+ + + +

X

+
+
x - Variable in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
 
+
+ + + +

Y

+
+
y - Variable in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
 
+
+ + + +

Z

+
+
zero - Static variable in class edu.ucsb.cs56.projects.games.pokemon.Vector2
+
 
+
+A B C D E F G H I K L M N O P R S T U V W X Y Z 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..a1f584b --- /dev/null +++ b/docs/index.html @@ -0,0 +1,75 @@ + + + + + +Generated Documentation (Untitled) + + + + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> + + + diff --git a/docs/overview-frame.html b/docs/overview-frame.html new file mode 100644 index 0000000..fdfd19e --- /dev/null +++ b/docs/overview-frame.html @@ -0,0 +1,29 @@ + + + + + +Overview List + + + + + + + +

 

+ + diff --git a/docs/overview-summary.html b/docs/overview-summary.html new file mode 100644 index 0000000..d30bd0d --- /dev/null +++ b/docs/overview-summary.html @@ -0,0 +1,165 @@ + + + + + +Overview + + + + + + + + +
+ + + + + + + +
+ + + + +
+ + + + + + + +
+ + + + diff --git a/docs/overview-tree.html b/docs/overview-tree.html new file mode 100644 index 0000000..5374012 --- /dev/null +++ b/docs/overview-tree.html @@ -0,0 +1,226 @@ + + + + + +Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + + +
+

Class Hierarchy

+ +

Interface Hierarchy

+
    +
  • edu.ucsb.cs56.projects.games.pokemon.commands.Command
  • +
+

Enum Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/docs/package-list b/docs/package-list new file mode 100644 index 0000000..61bb445 --- /dev/null +++ b/docs/package-list @@ -0,0 +1,9 @@ +edu.ucsb.cs56.projects.games.pokemon +edu.ucsb.cs56.projects.games.pokemon.IO +edu.ucsb.cs56.projects.games.pokemon.commands +edu.ucsb.cs56.projects.games.pokemon.components +edu.ucsb.cs56.projects.games.pokemon.factories +edu.ucsb.cs56.projects.games.pokemon.framework +edu.ucsb.cs56.projects.games.pokemon.graphics +edu.ucsb.cs56.projects.games.pokemon.systems +edu.ucsb.cs56.projects.games.pokemon.tests diff --git a/docs/script.js b/docs/script.js new file mode 100644 index 0000000..b346356 --- /dev/null +++ b/docs/script.js @@ -0,0 +1,30 @@ +function show(type) +{ + count = 0; + for (var key in methods) { + var row = document.getElementById(key); + if ((methods[key] & type) != 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) +{ + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} diff --git a/docs/serialized-form.html b/docs/serialized-form.html new file mode 100644 index 0000000..9376f4c --- /dev/null +++ b/docs/serialized-form.html @@ -0,0 +1,203 @@ + + + + + +Serialized Form + + + + + + + + + + + +
+

Serialized Form

+
+
+ +
+ + + + + + diff --git a/docs/stylesheet.css b/docs/stylesheet.css new file mode 100644 index 0000000..98055b2 --- /dev/null +++ b/docs/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} diff --git a/src/edu/ucsb/cs56/projects/games/pokemon/InputHandler.java b/src/edu/ucsb/cs56/projects/games/pokemon/InputHandler.java index d8a96ee..b967489 100644 --- a/src/edu/ucsb/cs56/projects/games/pokemon/InputHandler.java +++ b/src/edu/ucsb/cs56/projects/games/pokemon/InputHandler.java @@ -86,6 +86,18 @@ public void keyPressed(KeyEvent e) { case KeyEvent.VK_H: keys[4] = true; break; + case KeyEvent.VK_UP: + keys[0] = true; + break; + case KeyEvent.VK_DOWN: + keys[1] = true; + break; + case KeyEvent.VK_LEFT: + keys[2] = true; + break; + case KeyEvent.VK_RIGHT: + keys[3] = true; + break; default: break; } @@ -114,6 +126,18 @@ public void keyReleased(KeyEvent e) { case KeyEvent.VK_H: keys[4] = false; break; + case KeyEvent.VK_UP: + keys[0] = false; + break; + case KeyEvent.VK_DOWN: + keys[1] = false; + break; + case KeyEvent.VK_LEFT: + keys[2] = false; + break; + case KeyEvent.VK_RIGHT: + keys[3] = false; + break; default: break; } diff --git a/src/edu/ucsb/cs56/projects/games/pokemon/TileData.java b/src/edu/ucsb/cs56/projects/games/pokemon/TileData.java index cd74337..d4193ba 100644 --- a/src/edu/ucsb/cs56/projects/games/pokemon/TileData.java +++ b/src/edu/ucsb/cs56/projects/games/pokemon/TileData.java @@ -69,7 +69,7 @@ public static Texture IDToTexture(int tileID) { switch (tileID) { case 0: return Assets.grass_Default; case 1: return Assets.grass_Wild; - case 2: return Assets.snow; + case 2: return Assets.pokeball; case 3: return Assets.water1; case 4: return Assets.water2; case 5: return Assets.water3; @@ -79,7 +79,9 @@ public static Texture IDToTexture(int tileID) { case 9: return Assets.water7; case 10: return Assets.water8; case 11: return Assets.water9; - default: return Assets.grass_Default; + case 12: return Assets.flower; + case 13: return Assets.flower2; + default: return Assets.grass_Default; } } @@ -97,7 +99,9 @@ public static boolean IDToCollision(int tileID) { case 9: return true; case 10: return true; case 11: return true; - default: return false; + case 12: return true; + case 13: return true; + default: return false; } } } diff --git a/src/edu/ucsb/cs56/projects/games/pokemon/World.java b/src/edu/ucsb/cs56/projects/games/pokemon/World.java index 49650cd..fdd8479 100644 --- a/src/edu/ucsb/cs56/projects/games/pokemon/World.java +++ b/src/edu/ucsb/cs56/projects/games/pokemon/World.java @@ -78,6 +78,7 @@ public World(InputHandler inputHandler) { addEntity(BuildingFactory.constructBuildingEntity("pokemart",0,10)); addEntity(BuildingFactory.constructBuildingEntity("smallHouse", 5, 2)); addEntity(BuildingFactory.constructBuildingEntity("largeHouse", 12, 0)); + addEntity(BuildingFactory.constructBuildingEntity("mediumHouse", 15, 10)); } /** @@ -108,7 +109,7 @@ public Entity[] getEntities() { */ public void update() { inputHandler.updateMovement(player); - ((GraphicsComponent)player.getComponent(GraphicsComponent.class)).animation.advance(0.03f, + ((GraphicsComponent)player.getComponent(GraphicsComponent.class)).animation.advance(.27f, (MovementComponent)player.getComponent(MovementComponent.class)); } } diff --git a/src/edu/ucsb/cs56/projects/games/pokemon/framework/MainWindow.java b/src/edu/ucsb/cs56/projects/games/pokemon/framework/MainWindow.java index e5183a1..0378d01 100644 --- a/src/edu/ucsb/cs56/projects/games/pokemon/framework/MainWindow.java +++ b/src/edu/ucsb/cs56/projects/games/pokemon/framework/MainWindow.java @@ -14,10 +14,10 @@ */ public class MainWindow extends JPanel { boolean running = true; - int width = 640; - int height = 480; + int width = 320; + int height = 357; static final long maxTime = 16666; - static final float gameFrameTime = .016666f; + static final float gameFrameTime = .15f; private JFrame containerWindow; volatile private boolean initialized = false; diff --git a/src/edu/ucsb/cs56/projects/games/pokemon/maps/Pond_Map.txt b/src/edu/ucsb/cs56/projects/games/pokemon/maps/Pond_Map.txt index 56026cd..398809b 100644 --- a/src/edu/ucsb/cs56/projects/games/pokemon/maps/Pond_Map.txt +++ b/src/edu/ucsb/cs56/projects/games/pokemon/maps/Pond_Map.txt @@ -5,13 +5,13 @@ Pond_Map {width:20 height:20 [0, 0, 1], [0, 1, 1],[0, 2, 1], [0, 3, 1], [0, 4, 1], [0, 5, 1], [0, 6, 1], [0, 7, 1], [0, 8, 1], [0, 9, 1], [0, 10, 1], [0, 11, 1], [0, 12, 1], [0, 13, 1], [0, 14, 1], [0, 15, 1], [0, 16, 1], [0, 17, 1], [0, 18, 1], [0, 19, 1], -[0, 0, 2], [0, 1, 2], [0, 2, 2], [0, 3, 2], [0, 4, 2], [0, 5, 2], [0, 6, 2], [0, 7, 2], [0, 8, 2], [0, 9, 2], +[0, 0, 2], [13, 1, 2], [13, 2, 2], [0, 3, 2], [0, 4, 2], [0, 5, 2], [0, 6, 2], [0, 7, 2], [0, 8, 2], [0, 9, 2], [0, 10, 2], [0, 11, 2], [0, 12, 2], [0, 13, 2], [0, 14, 2], [0, 15, 2], [0, 16, 2], [0, 17, 2], [0, 18, 2], [0, 19, 2], -[0, 0, 3], [0, 1, 3], [0, 2, 3], [0, 3, 3], [0, 4, 3], [0, 5, 3], [0, 6, 3], [0, 7, 3], [0, 8, 3], [0, 9, 3], +[0, 0, 3], [13, 1, 3], [13, 2, 3], [0, 3, 3], [0, 4, 3], [0, 5, 3], [0, 6, 3], [0, 7, 3], [0, 8, 3], [0, 9, 3], [0, 10, 3], [0, 11, 3], [0, 12, 3], [0, 13, 3], [0, 14, 3], [0, 15, 3], [0, 16, 3], [0, 17, 3], [0, 18, 3], [0, 19, 3], -[0, 0, 4], [0, 1, 4], [0, 2, 4], [0, 3, 4], [0, 4, 4], [0, 5, 4], [0, 6, 4], [0, 7, 4], [0, 8, 4], [0, 9, 4], +[0, 0, 4], [13, 1, 4], [13, 2, 4], [0, 3, 4], [0, 4, 4], [0, 5, 4], [0, 6, 4], [0, 7, 4], [0, 8, 4], [0, 9, 4], [0, 10, 4], [0, 11, 4], [0, 12, 4], [0, 13, 4], [0, 14, 4], [0, 15, 4], [0, 16, 4], [0, 17, 4], [0, 18, 4], [0, 19, 4], [0, 0, 5], [0, 1, 3], [0, 2, 3], [0, 3, 3], [0, 4, 0], [0, 5, 0], [0, 6, 0], [0, 7, 0], [0, 8, 0], [0, 9, 0], @@ -50,13 +50,13 @@ Pond_Map {width:20 height:20 [1, 0, 16], [1, 1, 16], [1, 2, 16], [1, 3, 16], [1, 4, 16], [0, 5, 16], [0, 6, 16], [0, 7, 16], [0, 8, 16], [0, 9, 16], [0, 10, 16], [0, 11, 16], [0, 12, 16], [0, 13, 16], [0, 14, 16], [0, 15, 16], [0, 16, 16], [0, 17, 16], [0, 18, 16], [0, 19, 16], -[1, 0, 17], [1, 1, 17], [1, 2, 17], [1, 3, 17], [1, 4, 17], [0, 5, 17], [0, 6, 17], [0, 7, 17], [0, 8, 17], [0, 9, 17], +[1, 0, 17], [1, 1, 17], [1, 2, 17], [1, 3, 17], [1, 4, 17], [0, 5, 17], [13, 6, 17], [13, 7, 17], [13, 8, 17], [0, 9, 17], [0, 10, 17], [0, 11, 17], [0, 12, 17], [0, 13, 17], [0, 14, 17], [0, 15, 17], [0, 16, 17], [0, 17, 17], [0, 18, 17], [0, 19, 17], -[1, 0, 18], [1, 1, 18], [1, 2, 18], [1, 3, 18], [1, 4, 18], [0, 5, 18], [0, 6, 18], [0, 7, 18], [0, 8, 18], [0, 9, 18], +[1, 0, 18], [1, 1, 18], [1, 2, 18], [1, 3, 18], [1, 4, 18], [0, 5, 18], [13, 6, 18], [13, 7, 18], [13, 8, 18], [0, 9, 18], [0, 10, 18], [0, 11, 18], [0, 12, 18], [0, 13, 18], [0, 14, 18], [0, 15, 18], [0, 16, 18], [0, 17, 18], [0, 18, 18], [0, 19, 18], -[1, 0, 19], [1, 1, 19], [1, 2, 19], [1, 3, 19], [1, 4, 19], [0, 5, 19], [0, 6, 19], [0, 7, 19], [0, 8, 19], [0, 9, 19], +[1, 0, 19], [1, 1, 19], [1, 2, 19], [1, 3, 19], [1, 4, 19], [12, 5, 19], [12, 6, 19], [12, 7, 19], [12, 8, 19], [12, 9, 19], [0, 10, 19], [0, 11, 19], [0, 12, 19], [0, 13, 19], [0, 14, 19], [0, 15, 19], [0, 16, 19], [0, 17, 19], [0, 18, 19], [0, 19, 19], -} \ No newline at end of file +} diff --git a/src/edu/ucsb/cs56/projects/games/pokemon/systems/MovementSystem.java b/src/edu/ucsb/cs56/projects/games/pokemon/systems/MovementSystem.java index 154d954..a701e7e 100644 --- a/src/edu/ucsb/cs56/projects/games/pokemon/systems/MovementSystem.java +++ b/src/edu/ucsb/cs56/projects/games/pokemon/systems/MovementSystem.java @@ -93,16 +93,35 @@ public boolean overLaps(PositionComponent PC1, MovementComponent MC1, Entity[] e for (Entity object : entities) { PositionComponent PC2 = (PositionComponent)object.getComponent(PositionComponent.class); CollisionComponent CC2 = (CollisionComponent)object.getComponent(CollisionComponent.class); - + // PositionComponent CC2 = (CollisionComponent)object.getComponent(CollisionComponent.class); //checks if moving entity's next position is inside the hitbox of the other entity - if ( ((PC1.position.x + PC1.offset.x) <= ((PC2.position.x) + CC2.width)) && + /* if (( ((PC1.position.x + PC1.offset.x) <= ((PC2.position.x) + CC2.width)) && ((PC1.position.x + PC1.offset.x) >= ((PC2.position.x))) && ((PC1.position.y + PC1.offset.y) >= ((PC2.position.y))) && - ((PC1.position.y + PC1.offset.y) <= ((PC2.position.y + CC2.height))) && CC2.hasCollision ) { + ((PC1.position.y + PC1.offset.y) <= ((PC2.position.y + CC2.height))) && CC2.hasCollision)) { return true; - } + */ + //blue building + if ( (PC1.position.x + PC1.offset.x <= 3) && (PC1.position.y + PC1.offset.y >= 10 && PC1.position.y + PC1.offset.y <= 13) ) { + return true; + } + + if ( (PC1.position.x + PC1.offset.x >= 5 && PC1.position.x + PC1.offset.x <= 9) && (PC1.position.y + PC1.offset.y >= 2 && PC1.position.y + PC1.offset.y <= 4) ) { + return true; + } + + //checks if moving entity's next position is outside the bounds of the map + if ( (PC1.position.x + PC1.offset.x >= 20) || (PC1.position.y + PC1.offset.y >= 20) ) { + return true; + } + + if ( (PC1.position.x + PC1.offset.x <= -1) || (PC1.position.y + PC1.offset.y <= -1) ) { + return true; + } + + else { continue; } @@ -115,13 +134,32 @@ public boolean overLaps(PositionComponent PC1, MovementComponent MC1, Entity[] e CollisionComponent CC2 = (CollisionComponent) object2.getComponent(CollisionComponent.class); //checks if moving entity's next position is inside the hitbox of the tile - if (((PC1.position.x + PC1.offset.x) < ((PC2.position.x) + CC2.width)) && + /* if (((PC1.position.x + PC1.offset.x) < ((PC2.position.x) + CC2.width)) && ((PC1.position.x + PC1.offset.x) > ((PC2.position.x))) && ((PC1.position.y + PC1.offset.y) > ((PC2.position.y))) && ((PC1.position.y + PC1.offset.y) < ((PC2.position.y + CC2.height))) && CC2.hasCollision) { return true; - - } else { + } +*/ + //blue building + if ( (PC1.position.x + PC1.offset.x <= 3) && (PC1.position.y + PC1.offset.y >= 10 && PC1.position.y + PC1.offset.y <= 13) ) { + return true; + } + + if ( (PC1.position.x + PC1.offset.x >= 5 && PC1.position.x + PC1.offset.x <= 9) && (PC1.position.y + PC1.offset.y >= 2 && PC1.position.y + PC1.offset.y <= 4) ) { + return true; + } + + //checks if moving entity's next position is outside the bounds of the map + if ( (PC1.position.x + PC1.offset.x >= 20) || (PC1.position.y + PC1.offset.y >= 20) ) { + return true; + } + + if ( (PC1.position.x + PC1.offset.x <= -1) || (PC1.position.y + PC1.offset.y <= -1) ) { + return true; + } + + else { continue; } }