UnitType docs
This commit is contained in:
@@ -23,9 +23,9 @@ public class MoveLightningAbility extends Ability{
|
||||
/** Lightning color */
|
||||
public Color color = Color.valueOf("a9d8ff");
|
||||
/** Shifts where the lightning spawns along the Y axis */
|
||||
public float offset = 0f;
|
||||
public float y = 0f;
|
||||
/** Offset along the X axis */
|
||||
public float width = 0f;
|
||||
public float x = 0f;
|
||||
/** Whether the spawn side alternates */
|
||||
public boolean alternate = true;
|
||||
/** Jittering heat sprite like the shield on v5 Javelin */
|
||||
@@ -43,22 +43,22 @@ public class MoveLightningAbility extends Ability{
|
||||
|
||||
MoveLightningAbility(){}
|
||||
|
||||
public MoveLightningAbility(float damage, int length, float chance, float offset, float minSpeed, float maxSpeed, Color color, String heatRegion){
|
||||
public MoveLightningAbility(float damage, int length, float chance, float y, float minSpeed, float maxSpeed, Color color, String heatRegion){
|
||||
this.damage = damage;
|
||||
this.length = length;
|
||||
this.chance = chance;
|
||||
this.offset = offset;
|
||||
this.y = y;
|
||||
this.minSpeed = minSpeed;
|
||||
this.maxSpeed = maxSpeed;
|
||||
this.color = color;
|
||||
this.heatRegion = heatRegion;
|
||||
}
|
||||
|
||||
public MoveLightningAbility(float damage, int length, float chance, float offset, float minSpeed, float maxSpeed, Color color){
|
||||
public MoveLightningAbility(float damage, int length, float chance, float y, float minSpeed, float maxSpeed, Color color){
|
||||
this.damage = damage;
|
||||
this.length = length;
|
||||
this.chance = chance;
|
||||
this.offset = offset;
|
||||
this.y = y;
|
||||
this.minSpeed = minSpeed;
|
||||
this.maxSpeed = maxSpeed;
|
||||
this.color = color;
|
||||
@@ -68,7 +68,7 @@ public class MoveLightningAbility extends Ability{
|
||||
public void update(Unit unit){
|
||||
float scl = Mathf.clamp((unit.vel().len() - minSpeed) / (maxSpeed - minSpeed));
|
||||
if(Mathf.chance(Time.delta * chance * scl)){
|
||||
float x = unit.x + Angles.trnsx(unit.rotation, offset, width * side), y = unit.y + Angles.trnsy(unit.rotation, offset, width * side);
|
||||
float x = unit.x + Angles.trnsx(unit.rotation, this.y, this.x * side), y = unit.y + Angles.trnsy(unit.rotation, this.y, this.x * side);
|
||||
|
||||
shootEffect.at(x, y, unit.rotation, color, parentizeEffects ? unit : null);
|
||||
shootSound.at(x, y);
|
||||
|
||||
Reference in New Issue
Block a user