Class WeaponAuraManager
java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.combatitemscomponents.WeaponAuraManager
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Applies the given aura to the given weapon.void
Check if the aura is expired, if it is reverts the weapon stats to default and remove the aura.getAura()
Returns the aura currently applied to the equipped weapon of the playervoid
Sets the given aura to the applied auravoid
setCombatAnimator
(Entity combatAnimator) Sets the combat item animator for this actions componentvoid
setWeaponStats
(Entity weapon) Sets the weapon stats if player is equipped with a weaponvoid
update()
Called once per frame of the game, and should be used for most component logic.Methods inherited from class com.deco2800.game.components.Component
create, dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate
-
Field Details
-
auraApplied
-
-
Constructor Details
-
WeaponAuraManager
public WeaponAuraManager()
-
-
Method Details
-
setCombatAnimator
Sets the combat item animator for this actions component- Parameters:
combatAnimator
- the combat animator entity which has subcomponents PlayerSkillAnimationController and AnimationRenderer
-
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. -
checkAuraEffect
public void checkAuraEffect()Check if the aura is expired, if it is reverts the weapon stats to default and remove the aura. -
setAura
Sets the given aura to the applied aura- Parameters:
aura
-
-
setWeaponStats
Sets the weapon stats if player is equipped with a weapon- Parameters:
weapon
-
-
applyAura
Applies the given aura to the given weapon.- Parameters:
aura
- Aura to apply to the weaponweapon
- Weapon to apply the aura to
-
getAura
Returns the aura currently applied to the equipped weapon of the player- Returns:
- Aura currently applied to the equipped weapon of the player.
-
getWeaponStats
-