Package model.entities.enemies
Class MaitaModel
java.lang.Object
model.entities.EntityModel
model.entities.enemies.EnemyModel
model.entities.enemies.MaitaModel
- All Implemented Interfaces:
Fallable
Classe che rappresenta il modello di un nemico di tipo Maita.
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, walkSpeed
Fields inherited from class model.entities.EntityModel
airSpeed, fallingSpeed, fallSpeedAfterCollision, gravity, height, hitbox, inAir, width, x, y
-
Constructor Summary
ConstructorsConstructorDescriptionMaitaModel
(float x, float y) Costruttore per inizializzare il modello Maita. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
Controlla se il nemico deve sparare una palla di fuoco.void
update()
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, walkwithSameY
Methods inherited from class model.entities.EntityModel
checkOutOfMap, fallingChecks, getHeight, getHitbox, getLevelManager, getWidth, getX, getY, initHitbox, isInAir, isInAirCheck, resetInAir, setFallingSpeed
-
Constructor Details
-
MaitaModel
public MaitaModel(float x, float y) Costruttore per inizializzare il modello Maita.- 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:
update
in 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.
-