Package com.dicycat.kroy.bullets
Class Pattern
- java.lang.Object
-
- com.dicycat.kroy.bullets.Pattern
-
public class Pattern extends java.lang.Object
Stores patterns of bullets to fire- Author:
- Riju De
-
-
Constructor Summary
Constructors Constructor Description Pattern(int speed, int range, float timeBetweenShots, int patternLength, int multi, float cooldown)
Create an aimed patternPattern(int degree, int speed, int range, float timeBetweenShots, int patternLength, int multi, float cooldown)
Create a static directional pattern, fires in a single defined directionPattern(java.lang.Boolean clockwise, int startAngle, int rotations, int speed, int range, float timeBetweenShots, int multi, float cooldown)
Create a spiral pattern
-
Method Summary
Modifier and Type Method Description Bullet[]
aimedSet(int set, com.badlogic.gdx.math.Vector2 aimDir)
Bullet[]
bulletSet(int set)
java.lang.Boolean
getAim()
Bullet[][]
getBullets()
float
getCooldown()
float
getWaitTime()
-
-
-
Constructor Detail
-
Pattern
public Pattern(int degree, int speed, int range, float timeBetweenShots, int patternLength, int multi, float cooldown)
Create a static directional pattern, fires in a single defined direction- Parameters:
degree
- Direction to shootspeed
- Speed of the bulletsrange
- Distance each bullet travelstimeBetweenShots
- Time before the next shotpatternLength
- How many shots in the patternmulti
- How many bullets per shot (spread)cooldown
- Time after pattern to wait before firing the next pattern
-
Pattern
public Pattern(int speed, int range, float timeBetweenShots, int patternLength, int multi, float cooldown)
Create an aimed pattern- Parameters:
speed
- Speed of the bulletsrange
- Distance each bullet travelstimeBetweenShots
- Time before the next shotpatternLength
- How many shots in the patternmulti
- How many bullets per shot (spread)cooldown
- Time after pattern to wait before firing the next pattern
-
Pattern
public Pattern(java.lang.Boolean clockwise, int startAngle, int rotations, int speed, int range, float timeBetweenShots, int multi, float cooldown)
Create a spiral pattern- Parameters:
clockwise
- Should the spiral spin clockwise?startAngle
- Starting direction of the spiralrotations
- How many full rotations to performspeed
- Speed of the bulletsrange
- Distance each bullet travelstimeBetweenShots
- Time before the next shotmulti
- How many bullets per shot (spread)cooldown
- Time after pattern to wait before firing the next pattern
-
-
Method Detail
-
bulletSet
public Bullet[] bulletSet(int set)
- Parameters:
set
- The set of bullets to fire- Returns:
- Set of bullets to fire
-
aimedSet
public Bullet[] aimedSet(int set, com.badlogic.gdx.math.Vector2 aimDir)
- Parameters:
set
- The set of bullets to fireaimDir
- The direction the bullets should fire- Returns:
- Set of aimed bullets to fire
-
getAim
public java.lang.Boolean getAim()
-
getBullets
public Bullet[][] getBullets()
-
getWaitTime
public float getWaitTime()
-
getCooldown
public float getCooldown()
-
-