vooga.examples.level
Class ScrollerLevel

java.lang.Object
  extended by vooga.examples.level.Level
      extended by vooga.examples.level.ScrollerLevel

public class ScrollerLevel
extends Level


Constructor Summary
ScrollerLevel(java.util.Scanner fileToBeRead, java.awt.Dimension screenSize, java.awt.Dimension gameSpace)
           
 
Method Summary
static java.util.Collection<Sprite> getCurrentScreenSprites(java.util.Collection<Sprite> allSprites, double heroX, double heroY)
          This method will be called in the update method of the main game class.
 
Methods inherited from class vooga.examples.level.Level
getCollisionManager, getEvents, getLevelState, getResources, getSpritesList, loadSprites, setCollision, setCollision, setEvents, setEvents, setGameState, setGameState, setResources, setResources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScrollerLevel

public ScrollerLevel(java.util.Scanner fileToBeRead,
                     java.awt.Dimension screenSize,
                     java.awt.Dimension gameSpace)
Parameters:
fileToBeRead - - level file that contains Sprites' details
screenSize - - Dimension of the Screen
gameSpace - - Dimension of the gameSpace
Method Detail

getCurrentScreenSprites

public static java.util.Collection<Sprite> getCurrentScreenSprites(java.util.Collection<Sprite> allSprites,
                                                                   double heroX,
                                                                   double heroY)
This method will be called in the update method of the main game class. It returns all the sprites to be currently displayed on the screen, ensuring that the hero is in the center of the screen.

Parameters:
allSprites - - Collection of all the sprites for the current level
heroX - - X coordinate of the hero,
heroY - - Y coordinate of the hero
Returns:
Collection of Sprites to be updated to the screen