public class Lightning.Arc
extends java.lang.Object
Constructor and Description |
---|
Arc(org.bukkit.Location startPoint,
org.bukkit.Location endPoint) |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Stops this Arc from further animating or doing damage.
|
java.util.ArrayList<Lightning.Arc> |
generateArcs(double chance,
double range,
double maxArcAngle)
Randomly generates subarcs off of this arc.
|
void |
generatePoints(int times)
Runs an arc generation algorithm by first creating two points, the
starting point and the ending point.
|
int |
getAnimationCounter() |
java.util.ArrayList<Lightning.AnimationLocation> |
getAnimationLocations() |
org.bukkit.util.Vector |
getDirection() |
java.util.ArrayList<Lightning.LightningParticle> |
getParticles() |
java.util.ArrayList<org.bukkit.Location> |
getPoints() |
java.util.ArrayList<Lightning.Arc> |
getSubArcs() |
void |
setAnimationCounter(int animationCounter) |
void |
setDirection(org.bukkit.util.Vector direction) |
public void cancel()
public java.util.ArrayList<Lightning.Arc> generateArcs(double chance, double range, double maxArcAngle)
chance
- The chance that an arc will be generated for each specific
point in the arc. Note: if you generate a lot of points
then chance will need to be lowered.range
- The length of each subarc.public void generatePoints(int times)
times
- The amount of times that the arc will be split in half
causes O(n^2) complexitypublic int getAnimationCounter()
public void setAnimationCounter(int animationCounter)
public org.bukkit.util.Vector getDirection()
public void setDirection(org.bukkit.util.Vector direction)
public java.util.ArrayList<org.bukkit.Location> getPoints()
public java.util.ArrayList<Lightning.AnimationLocation> getAnimationLocations()
public java.util.ArrayList<Lightning.LightningParticle> getParticles()
public java.util.ArrayList<Lightning.Arc> getSubArcs()