public class Board
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
java.lang.String[] |
curMapImages
Stores the background images
|
java.lang.String[] |
curMapMaskImages
Stores the mask images
|
int |
curSection
Stores the current section
|
double[] |
curSectionStartX
Stores the starting x coordinates of each map section
|
double[] |
curSectionStartY
Stores the starting y coordinates of each map section
|
FakeImages |
fakeOverpass
Represents the the loop-the-loop overpass
|
ImageManager |
imageManager
Stores all of the sprite animations
|
java.util.HashMap<java.lang.String,OtherSonic> |
otherSonics
Stores all other Sonics
|
static int |
RECEIVE_PLAYER_INFO_DELAY
The delay to receive multiplayer info packets
|
java.util.Vector<Section> |
sections
Stores all the sections
|
Sonic |
sonic
Instance of the Sonic object
|
int |
totalMapWidth
Stores the total map width
|
| Constructor and Description |
|---|
Board()
The default constructor
|
Board(Camera camera)
The general constructor used to create the board
|
| Modifier and Type | Method and Description |
|---|---|
void |
changeCurSection(int change)
Changes the current section when Sonic moves to another section
|
void |
clearCurStage()
Removing all the game objects from the game
|
GameObject |
collisionDetection(GameObject gameObject,
boolean checkingForBarrier,
boolean isNotLandable,
boolean landingOnLoop1,
boolean checkingForBadniks)
Handling the collision detection within the 3 sections that surround the game Object
|
Section |
getCurSection()
Gets the curent section that Sonic is in
|
int |
getCurSectionIndex()
Gets the index which holds the current Section
|
GameObject |
getSonic()
Gets the GameObject Sonic
|
void |
loadCurStage(Camera camera)
Loading all the components of the board
|
void |
paint(java.awt.Graphics g)
Drawing all the game objects in the game
|
void |
update()
Updating all the game objects in the game
|
void |
updateOtherPlayerInfo()
Receives and updates other player info for the user
|
public static final int RECEIVE_PLAYER_INFO_DELAY
public java.lang.String[] curMapImages
public java.lang.String[] curMapMaskImages
public double[] curSectionStartX
public double[] curSectionStartY
public java.util.Vector<Section> sections
public int curSection
public int totalMapWidth
public FakeImages fakeOverpass
public Sonic sonic
public java.util.HashMap<java.lang.String,OtherSonic> otherSonics
public ImageManager imageManager
public Board()
public Board(Camera camera)
camera - Passing in the camera to pass to Sonicpublic GameObject getSonic()
public Section getCurSection()
public int getCurSectionIndex()
public void changeCurSection(int change)
The - amount to change the curSection indexpublic void loadCurStage(Camera camera)
camera - Passing in the camera to pass to Sonicpublic void updateOtherPlayerInfo()
public void clearCurStage()
public void paint(java.awt.Graphics g)
g - An instance of the Graphics objectpublic void update()
public GameObject collisionDetection(GameObject gameObject, boolean checkingForBarrier, boolean isNotLandable, boolean landingOnLoop1, boolean checkingForBadniks)
gameObject - The object checking for collisionscheckingForBarrier - Checking for barrierisNotLandable - Checking for a landable stage featurelandingOnLoop1 - Checking to land on the 1st section of the loop-the-loopcheckingForBadniks - Checking for badniks (mobs)