public static class PanelEffect.SteadyProjectileEffect extends PanelEffect.ProjectileEffect
PanelEffect.ProjectileEffect
, but its duration specifies the amount of time to spend crossing each
cell (in seconds), not the duration of the entire effect. For ranged weapons like arrows, a fixed duration for
the effect (as in ProjectileEffect) would mean an arrow shot at a close-by target travels slowly and an arrow
shot at a far-away target travels very quickly; this class avoids that issue. Note that the time spent by the
whole effect will vary based on the Chebyshev distance between the start and end points. The speed the projectile
travels at is also dependent on the size and aspect ratio of cells it travels over.PanelEffect.ExplosionEffect, PanelEffect.GibberishEffect, PanelEffect.GlowBallEffect, PanelEffect.ProjectileEffect, PanelEffect.PulseEffect, PanelEffect.SteadyProjectileEffect
affected, color, endPoint, shown, startPoint
fastInSlowMidFastOut, target, validCells
Constructor and Description |
---|
SteadyProjectileEffect(IPackedColorPanel targeting,
squidpony.squidmath.Coord startPoint,
squidpony.squidmath.Coord endPoint)
Constructs a SteadyProjectileEffect with explicit settings for some fields.
|
SteadyProjectileEffect(IPackedColorPanel targeting,
float duration,
squidpony.squidmath.Coord startPoint,
squidpony.squidmath.Coord endPoint)
Constructs a SteadyProjectileEffect with explicit settings for some fields.
|
SteadyProjectileEffect(IPackedColorPanel targeting,
float duration,
squidpony.squidmath.GreasedRegion valid,
squidpony.squidmath.Coord startPoint,
squidpony.squidmath.Coord endPoint)
Constructs a SteadyProjectileEffect with explicit settings for most fields.
|
SteadyProjectileEffect(IPackedColorPanel targeting,
float duration,
squidpony.squidmath.GreasedRegion valid,
squidpony.squidmath.Coord startPoint,
squidpony.squidmath.Coord endPoint,
char shown,
com.badlogic.gdx.graphics.Color coloring)
Constructs a SteadyProjectileEffect with explicit settings for most fields but also an alternate Color
object for the projectile instead of the default white color.
|
SteadyProjectileEffect(IPackedColorPanel targeting,
float duration,
squidpony.squidmath.GreasedRegion valid,
squidpony.squidmath.Coord startPoint,
squidpony.squidmath.Coord endPoint,
char shown,
float coloring)
Constructs a SteadyProjectileEffect with explicit settings for most fields but also an alternate Color
object for the projectile instead of the default white color.
|
update, useArcPathInterpolation, useStraightPathInterpolation
makeGrenadeEffect
act, begin, end, finish, getDuration, getInterpolation, getTime, isComplete, isReverse, reset, restart, setDuration, setInterpolation, setReverse, setTime
public SteadyProjectileEffect(IPackedColorPanel targeting, squidpony.squidmath.Coord startPoint, squidpony.squidmath.Coord endPoint)
targeting
- the IPackedColorPanel to affectstartPoint
- the starting point of the projectile; may be best if it is adjacent to whatever fires itendPoint
- the point to try to hit with the projectile; this should always succeed with no obstructionspublic SteadyProjectileEffect(IPackedColorPanel targeting, float duration, squidpony.squidmath.Coord startPoint, squidpony.squidmath.Coord endPoint)
targeting
- the IPackedColorPanel to affectduration
- the time the projectile will take to cross one cell, in seconds as a floatstartPoint
- the starting point of the projectile; may be best if it is adjacent to whatever fires itendPoint
- the point to try to hit with the projectile; this should always succeed with no obstructionspublic SteadyProjectileEffect(IPackedColorPanel targeting, float duration, squidpony.squidmath.GreasedRegion valid, squidpony.squidmath.Coord startPoint, squidpony.squidmath.Coord endPoint)
targeting
- the IPackedColorPanel to affectduration
- the duration of this PanelEffect in seconds, as a floatvalid
- the valid cells that can be changed by this PanelEffect, as a GreasedRegionstartPoint
- the starting point of the projectile; may be best if it is adjacent to whatever fires itendPoint
- the point to try to hit with the projectile; this may not be reached if the path crosses a cell not in validpublic SteadyProjectileEffect(IPackedColorPanel targeting, float duration, squidpony.squidmath.GreasedRegion valid, squidpony.squidmath.Coord startPoint, squidpony.squidmath.Coord endPoint, char shown, com.badlogic.gdx.graphics.Color coloring)
targeting
- the IPackedColorPanel to affectduration
- the time the projectile will take to cross one cell, in seconds as a floatvalid
- the valid cells that can be changed by this PanelEffect, as a GreasedRegionstartPoint
- the starting point of the projectile; may be best if it is adjacent to whatever fires itendPoint
- the point to try to hit with the projectile; this may not be reached if the path crosses a cell not in validshown
- the char to show at each step of the projectile's path as it advancescoloring
- a Color or subclass thereof that will replace the default white color herepublic SteadyProjectileEffect(IPackedColorPanel targeting, float duration, squidpony.squidmath.GreasedRegion valid, squidpony.squidmath.Coord startPoint, squidpony.squidmath.Coord endPoint, char shown, float coloring)
targeting
- the IPackedColorPanel to affectduration
- the time the projectile will take to cross one cell, in seconds as a floatvalid
- the valid cells that can be changed by this PanelEffect, as a GreasedRegionstartPoint
- the starting point of the projectile; may be best if it is adjacent to whatever fires itendPoint
- the point to try to hit with the projectile; this may not be reached if the path crosses a cell not in validshown
- the char to show at each step of the projectile's path as it advancescoloring
- an array of colors as packed floats that will replace the default white color hereCopyright © Eben Howard 2012–2022. All rights reserved.