Class PlayerActions
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.player.PlayerActions
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
create()
Called when the entity is created and registered.boolean
isMoving()
Gets if the player is moving or notvoid
startCombat
(Entity enemy) Initiates combat with a specified enemy entity.void
Unlocks the next area.void
unlockOceanMap
(Entity player) Checks if the bos in current area is defeat to unlock the ocean areavoid
update()
Called once per frame of the game, and should be used for most component logic.Methods inherited from class com.csse3200.game.components.Component
dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate
-
Constructor Details
-
PlayerActions
-
-
Method Details
-
create
public void create()Description copied from class:Component
Called when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished. -
unlocknextarea
public void unlocknextarea()Unlocks the next area. -
unlockOceanMap
Checks if the bos in current area is defeat to unlock the ocean area- Parameters:
player
- entity to check last triggered events
-
update
public void update()Description copied from class:Component
Called once per frame of the game, and should be used for most component logic. Not called if component is disabled. -
isMoving
public boolean isMoving()Gets if the player is moving or not- Returns:
- boolean of if the player currently moving
-
startCombat
Initiates combat with a specified enemy entity. Depending on the type of enemy, it displays an appropriate cutscene screen.- Parameters:
enemy
- The enemy entity that the player is engaging in combat with.
-