game.score
Class CScoreManager
java.lang.Object
game.physics.CStaticShape
game.score.CScoreManager
- All Implemented Interfaces:
- IGraphicObject
public class CScoreManager
- extends CStaticShape
- implements IGraphicObject
Contains the core of the scoring system.
Manages multiple hits and the multiplier.
- Author:
- sroccaserra
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MAX_MULTIPLIER
public static final int MAX_MULTIPLIER
- See Also:
- Constant Field Values
SHOW_INCREMENT_TIME
public static final float SHOW_INCREMENT_TIME
- See Also:
- Constant Field Values
OFFSET
private static final int OFFSET
- See Also:
- Constant Field Values
m_score
private int m_score
m_increment
private int m_increment
m_multiplier
private float m_multiplier
m_nbContinue
private int m_nbContinue
m_color
private final java.awt.Color m_color
m_nbFlash
private int m_nbFlash
m_goodFlashColor
private final java.awt.Color m_goodFlashColor
m_badFlashColor
private final java.awt.Color m_badFlashColor
m_isFreezed
private boolean m_isFreezed
m_incrementTextLife
private float m_incrementTextLife
CScoreManager
public CScoreManager(IGameDisplay gameScreen)
getScore
public final int getScore()
getIncrement
public final int getIncrement()
reset
public final void reset()
hit
public final void hit(int nbHits,
boolean bUpdateMultiplier)
miss
public final void miss()
useContinue
public final void useContinue()
freeze
public final void freeze()
- Freezes the score related variables, such as the score and the multiplier.
checkMultiplier
private final void checkMultiplier()
getMultiplier
public final float getMultiplier()
getRoundedMultiplier
public final int getRoundedMultiplier()
animate
public final void animate(float dt)
- Animates the multiplier.
- Specified by:
animate
in interface IGraphicObject
- Overrides:
animate
in class CStaticShape
draw
public final void draw(java.awt.Graphics g)
- Specified by:
draw
in interface IGraphicObject
drawMultiplierBar
private void drawMultiplierBar(java.awt.Graphics g,
int x,
int y)
- Self-explanatory.
- Parameters:
g
- x
- y
-
toString
public final java.lang.String toString()
- Overrides:
toString
in class java.lang.Object