Class BoomerangController
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.Weapons.WeaponControllerComponent
com.csse3200.game.components.Weapons.SpecWeapon.BoomerangController
-
Field Summary
Fields inherited from class com.csse3200.game.components.Weapons.WeaponControllerComponent
attackNum, config, currentRotation, player, remainingDuration -
Constructor Summary
ConstructorsConstructorDescriptionBoomerangController(WeaponConfig config, float attackDirection, Entity player, int attackNum) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadd_animations(AnimationRenderComponent animator) Function to add animations based on standard animation configurations (Overidable)protected voidinitial_animation(AnimationRenderComponent animator) Set intial animationprotected voidSet initial positionprotected voidSet initial rotation (defaults to attack direction)protected voidmove()Update entity location every tickprotected voidUpdate entity animation if requiredprotected voidrotate()Update entity rotation every tickMethods inherited from class com.csse3200.game.components.Weapons.WeaponControllerComponent
create, positionInDirection, updateMethods inherited from class com.csse3200.game.components.Component
dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate
-
Constructor Details
-
BoomerangController
public BoomerangController(WeaponConfig config, float attackDirection, Entity player, int attackNum)
-
-
Method Details
-
add_animations
Description copied from class:WeaponControllerComponentFunction to add animations based on standard animation configurations (Overidable)- Overrides:
add_animationsin classWeaponControllerComponent
-
initial_rotation
protected void initial_rotation()Description copied from class:WeaponControllerComponentSet initial rotation (defaults to attack direction)- Specified by:
initial_rotationin classWeaponControllerComponent
-
initial_position
protected void initial_position()Description copied from class:WeaponControllerComponentSet initial position- Specified by:
initial_positionin classWeaponControllerComponent
-
initial_animation
Description copied from class:WeaponControllerComponentSet intial animation- Specified by:
initial_animationin classWeaponControllerComponent- Parameters:
animator- - animation component for the entity
-
rotate
protected void rotate()Description copied from class:WeaponControllerComponentUpdate entity rotation every tick- Specified by:
rotatein classWeaponControllerComponent
-
move
protected void move()Description copied from class:WeaponControllerComponentUpdate entity location every tick- Specified by:
movein classWeaponControllerComponent
-
reanimate
protected void reanimate()Description copied from class:WeaponControllerComponentUpdate entity animation if required- Specified by:
reanimatein classWeaponControllerComponent
-