jkururin
Class Level

java.lang.Object
  |
  +--jkururin.Level

public class Level
extends java.lang.Object

Version:
 
Author:
root

Field Summary
(package private)  double clevel_view_originx
           
(package private)  double clevel_view_originy
           
(package private)  int currentTime
           
(package private)  double cview_pad_bottom
           
(package private)  double cview_pad_top
           
static java.awt.image.BufferedImage DF_GAME_FAILED
           
static java.awt.image.BufferedImage DF_GAME_FINISHED
           
static int DF_GAME_FPS_HISTORY
           
static int DF_GAME_SLEEP
           
static int DF_GAME_TIME
           
static int DF_PAD_COL_FCYCLES
           
static double DF_PAD_COL_MINCX
           
static double DF_PAD_COL_MINCY
           
static double DF_PAD_COL_RINC
           
static Sprite DF_PAD_COLLSPRITE
           
static int DF_PAD_LIVES
           
static Sprite DF_PAD_LIVESPRITE
           
static double DF_PAD_MINCX
           
static double DF_PAD_MINCY
           
static double DF_PAD_RINC
           
static double DF_SPRITE_COL_MINCX
           
static double DF_SPRITE_COL_MINCY
           
static double DF_SPRITE_COL_RINC
           
static boolean DF_SPRITE_COLLIDEABLE
           
static java.awt.image.BufferedImage[] DF_SPRITE_IMAGES
           
static double DF_SPRITE_INDEXINC
           
static double DF_SPRITE_MINCX
           
static double DF_SPRITE_MINCY
           
static double DF_SPRITE_RINC
           
static double DF_SPRITE_X
           
static double DF_SPRITE_Y
           
static int DF_VIEW_HALF_HEIGHT
           
static int DF_VIEW_HALF_WIDTH
           
static int DF_VIEW_HEIGHT
           
static int DF_VIEW_WIDTH
           
(package private)  int endBottom
           
(package private)  int endLeft
           
(package private)  int endRight
           
(package private)  int endTop
           
private  java.awt.Graphics2D gBuffer
           
(package private)  java.awt.image.BufferedImage iBuffer
           
private  boolean inPause
           
private  java.text.NumberFormat mFormat
           
private  double mFrameRate
           
private  boolean mPreviousFilled
           
private  int mPreviousIndex
           
private  long[] mPreviousTimes
           
(package private)  java.applet.AudioClip music
           
(package private)  java.lang.String name
           
(package private)  Pad pad
           
private  java.lang.Thread runner
           
private  java.awt.Component screen
           
private  java.awt.Graphics screenG
           
(package private)  Sprite[] sprites
           
(package private)  int time
           
 
Constructor Summary
Level(java.lang.String name, java.awt.Component screen, Pad pad, Sprite[] sprites)
          creates new Level
 
Method Summary
 void draw()
          updates view origin coords relative to level ones, draw sprites to buffer, calculates frameRate
 void startIntro()
           
 void startLevel()
          starts the level
 void stopIntro()
           
 void stopLevel(boolean finished)
          stops the level
 void switchPause()
          switch between paused and not paused
private  void updateViewOrigin()
           
 void win()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

DF_VIEW_WIDTH

public static final int DF_VIEW_WIDTH

DF_VIEW_HEIGHT

public static final int DF_VIEW_HEIGHT

DF_VIEW_HALF_WIDTH

public static final int DF_VIEW_HALF_WIDTH

DF_VIEW_HALF_HEIGHT

public static final int DF_VIEW_HALF_HEIGHT

DF_GAME_SLEEP

public static int DF_GAME_SLEEP

DF_GAME_FPS_HISTORY

public static final int DF_GAME_FPS_HISTORY

DF_GAME_TIME

public static final int DF_GAME_TIME

DF_GAME_FAILED

public static final java.awt.image.BufferedImage DF_GAME_FAILED

DF_GAME_FINISHED

public static final java.awt.image.BufferedImage DF_GAME_FINISHED

DF_SPRITE_X

public static final double DF_SPRITE_X

DF_SPRITE_Y

public static final double DF_SPRITE_Y

DF_SPRITE_COLLIDEABLE

public static final boolean DF_SPRITE_COLLIDEABLE

DF_SPRITE_MINCX

public static final double DF_SPRITE_MINCX

DF_SPRITE_MINCY

public static final double DF_SPRITE_MINCY

DF_SPRITE_COL_MINCX

public static final double DF_SPRITE_COL_MINCX

DF_SPRITE_COL_MINCY

public static final double DF_SPRITE_COL_MINCY

DF_SPRITE_INDEXINC

public static final double DF_SPRITE_INDEXINC

DF_SPRITE_IMAGES

public static final java.awt.image.BufferedImage[] DF_SPRITE_IMAGES

DF_SPRITE_RINC

public static final double DF_SPRITE_RINC

DF_SPRITE_COL_RINC

public static final double DF_SPRITE_COL_RINC

DF_PAD_LIVES

public static final int DF_PAD_LIVES

DF_PAD_RINC

public static final double DF_PAD_RINC

DF_PAD_MINCX

public static final double DF_PAD_MINCX

DF_PAD_MINCY

public static final double DF_PAD_MINCY

DF_PAD_COL_MINCX

public static final double DF_PAD_COL_MINCX

DF_PAD_COL_MINCY

public static final double DF_PAD_COL_MINCY

DF_PAD_COL_FCYCLES

public static final int DF_PAD_COL_FCYCLES

DF_PAD_COL_RINC

public static final double DF_PAD_COL_RINC

DF_PAD_LIVESPRITE

public static final Sprite DF_PAD_LIVESPRITE

DF_PAD_COLLSPRITE

public static final Sprite DF_PAD_COLLSPRITE

name

java.lang.String name

pad

Pad pad

sprites

Sprite[] sprites

music

java.applet.AudioClip music

endTop

int endTop

endBottom

int endBottom

endLeft

int endLeft

endRight

int endRight

cview_pad_top

double cview_pad_top

cview_pad_bottom

double cview_pad_bottom

clevel_view_originx

double clevel_view_originx

clevel_view_originy

double clevel_view_originy

screen

private java.awt.Component screen

screenG

private java.awt.Graphics screenG

iBuffer

java.awt.image.BufferedImage iBuffer

gBuffer

private java.awt.Graphics2D gBuffer

runner

private java.lang.Thread runner

inPause

private boolean inPause

time

int time

currentTime

int currentTime

mPreviousTimes

private long[] mPreviousTimes

mPreviousIndex

private int mPreviousIndex

mPreviousFilled

private boolean mPreviousFilled

mFrameRate

private double mFrameRate

mFormat

private java.text.NumberFormat mFormat
Constructor Detail

Level

public Level(java.lang.String name,
             java.awt.Component screen,
             Pad pad,
             Sprite[] sprites)
creates new Level
Method Detail

updateViewOrigin

private void updateViewOrigin()

startLevel

public void startLevel()
starts the level

stopLevel

public void stopLevel(boolean finished)
stops the level

switchPause

public void switchPause()
switch between paused and not paused

startIntro

public void startIntro()

stopIntro

public void stopIntro()

win

public void win()

draw

public void draw()
updates view origin coords relative to level ones, draw sprites to buffer, calculates frameRate