Package com.deco2800.game.components.npc
Class ContinuousAttackComponent
java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.npc.ContinuousAttackComponent
Continuous attack component - melee enemies will attack non-enemy attackable objects periodically while colliding with them
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionContinuousAttackComponent
(long delay, long period) continuousAttackComponent -
Method Summary
Methods inherited from class com.deco2800.game.components.Component
dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
ContinuousAttackComponent
public ContinuousAttackComponent(long delay, long period) continuousAttackComponent- Parameters:
delay
- the delay before attacking startsperiod
- the period between consecutive attacks
-
-
Method Details