Package model.entities.enemies
Class HidegonsModel
java.lang.Object
model.entities.EntityModel
model.entities.enemies.EnemyModel
model.entities.enemies.HidegonsModel
- All Implemented Interfaces:
Fallable
Classe che rappresenta il modello di un nemico di tipo Hidegons.
Estende la classe
EnemyModel e implementa le specifiche
per il comportamento di questo tipo di nemico.-
Field Summary
Fields inherited from class model.entities.enemies.EnemyModel
active, angry, bubbleSpeed, enemyState, foodSpawned, goingUp, inBubble, inBubbleTime, pathDuration, pathTick, resetAniTick, shootingTick, shootingTimer, shot, still, stillTick, stillTimer, stuck, targetYTile, walkDir, walkSpeedFields inherited from class model.entities.EntityModel
airSpeed, fallingSpeed, fallSpeedAfterCollision, gravity, height, hitbox, inAir, width, x, y -
Constructor Summary
ConstructorsConstructorDescriptionHidegonsModel(float x, float y) Costruttore per inizializzare il modello Hidegons. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidControlla se il nemico deve sparare una palla di fuoco.voidupdate()Aggiorna lo stato del nemico in base al suo stato attuale.Methods inherited from class model.entities.enemies.EnemyModel
checkBubbleDirection, checkThreeYTilesSolid, checkUpSolid, doDeathMovement, getEnemyState, getEnemyTileX, getEnemyTileY, getPlayerTileX, getPlayerTileY, getWalkDir, inBubbleMovement, isActive, isBubbleInXRange, isDeathMovement, isEnemyOnPlayerY, isFoodSpawned, isInBubble, isPlayerOnTopOfTheEnemy, isPlayerToLeftOfEnemy, isPlayerToRightOfEnemy, isResetAniTick, playerAndEnemyAreOnTheSameRow, setActive, setEnemyState, setFoodSpawned, setInBubble, setResetAniTick, startFloating, startShootingTimer, startStillTimer, updateEnemyState, updatePos, updateXPos, walkWithDifferentY, walkwithSameYMethods inherited from class model.entities.EntityModel
checkOutOfMap, fallingChecks, getHeight, getHitbox, getLevelManager, getWidth, getX, getY, initHitbox, isInAir, isInAirCheck, resetInAir, setFallingSpeed
-
Constructor Details
-
HidegonsModel
public HidegonsModel(float x, float y) Costruttore per inizializzare il modello Hidegons.- Parameters:
x- La coordinata X iniziale del nemico.y- La coordinata Y iniziale del nemico.
-
-
Method Details
-
update
public void update()Aggiorna lo stato del nemico in base al suo stato attuale. Se il nemico รจ in movimento, controlla se deve sparare o aggiornare la sua posizione.- Overrides:
updatein classEnemyModel
-
checKFireballShooting
private void checKFireballShooting()Controlla se il nemico deve sparare una palla di fuoco. Avvia il timer per rimanere fermo e spara una palla di fuoco se le condizioni sono soddisfatte.
-