Class AttackFactory
java.lang.Object
com.csse3200.game.entities.factories.AttackFactory
Class to create weapons when the player attacks
-
Method Summary
Modifier and TypeMethodDescriptionstatic EntitycreateAttack(WeaponConfig config, float attackDirection, Entity player, int attackNum) Static function to create a new weapon entitycreateAttacks(WeaponType weaponType, float attackDirection, Entity player) function to generate multiple attacks in a sequence attack
-
Method Details
-
createAttacks
public static ArrayList<Entity> createAttacks(WeaponType weaponType, float attackDirection, Entity player) function to generate multiple attacks in a sequence attack- Parameters:
weaponType-attackDirection-player-- Returns:
-
createAttack
public static Entity createAttack(WeaponConfig config, float attackDirection, Entity player, int attackNum) Static function to create a new weapon entity- Parameters:
config- config to weapon to createattackDirection- - the initial rotation of the playerplayer- - the player using this attackattackNum- - the number of the attack in the sequence- Returns:
- A reference to the created weapon entity
-