Class PlayerKeyPrompt
java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.TouchAttackComponent
com.deco2800.game.components.player.PlayerKeyPrompt
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
create()
Called when the entity is created and registered.void
keyPrompt
(com.badlogic.gdx.physics.box2d.Fixture me, com.badlogic.gdx.physics.box2d.Fixture other) This function is used for guiding the user to press the relevant key to interact with the entityvoid
playerCollisionEnd
(com.badlogic.gdx.physics.box2d.Fixture me, com.badlogic.gdx.physics.box2d.Fixture other) void
setKeyPromptAnimator
(Entity keyPromptAnimator) Methods inherited from class com.deco2800.game.components.Component
dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
PlayerKeyPrompt
public PlayerKeyPrompt(short targetLayer)
-
-
Method Details
-
setKeyPromptAnimator
-
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.- Overrides:
create
in classTouchAttackComponent
-
keyPrompt
public void keyPrompt(com.badlogic.gdx.physics.box2d.Fixture me, com.badlogic.gdx.physics.box2d.Fixture other) This function is used for guiding the user to press the relevant key to interact with the entity- Parameters:
me
-other
-
-
playerCollisionEnd
public void playerCollisionEnd(com.badlogic.gdx.physics.box2d.Fixture me, com.badlogic.gdx.physics.box2d.Fixture other)
-