Package view.entities
Class SkelMonstaView
java.lang.Object
view.entities.EnemyView
view.entities.SkelMonstaView
The SkelMonstaView class represents the view for the
SkelMonstaModel.
It handles drawing and updating the SkelMonsta's animation and state.-
Field Summary
Fields inherited from class view.entities.EnemyView
animationAction, animationIndex, animationSpeedMultiplier, animationTick, enemyModel -
Constructor Summary
ConstructorsConstructorDescriptionSkelMonstaView(EnemyModel enemyModel) Constructs a SkelMonstaView with the specified EnemyModel. -
Method Summary
Modifier and TypeMethodDescriptionvoidDraws the SkelMonsta on the screen.protected voidreset()Resets the SkelMonsta's animation and state variables.voidupdate()Updates the state and animation of the SkelMonsta.protected voidUpdates the animation tick and index based on the animation speed.Methods inherited from class view.entities.EnemyView
getAnimationIndex, isActive, updateStateVariables
-
Constructor Details
-
SkelMonstaView
Constructs a SkelMonstaView with the specified EnemyModel.- Parameters:
enemyModel- the model for the SkelMonsta enemy entity
-
-
Method Details
-
draw
Draws the SkelMonsta on the screen.- Parameters:
g- the Graphics object to draw with
-
update
public void update()Updates the state and animation of the SkelMonsta. -
updateAnimationTick
protected void updateAnimationTick()Updates the animation tick and index based on the animation speed.- Overrides:
updateAnimationTickin classEnemyView
-
reset
protected void reset()Resets the SkelMonsta's animation and state variables.
-