public class MmgPulse
extends java.lang.Object
Constructor and Description |
---|
MmgPulse(int startDir,
long totalMs,
double chng,
MmgVector2 blS)
Constructor that sets the start direction, the total milliseconds, the
change, and a baseline scaling value.
|
Modifier and Type | Method and Description |
---|---|
double |
GetChange()
Gets the rate of change.
|
int |
GetDirection()
Gets the direction of the oscillation.
|
long |
GetTimeFlip()
Gets the oscillation time flip for this object.
|
long |
GetTimeStart()
Gets the oscillation start time.
|
long |
GetTimeTotal()
Gets the total oscillation time.
|
void |
SetChange(double c)
Sets the rate of change.
|
void |
SetDirection(int d)
Sets the direction of the oscillation.
|
void |
SetTimeFlip(long l)
Sets the oscillation time flip for this object.
|
void |
SetTimeStart(long l)
Sets the oscillation start time.
|
void |
SetTimeTotal(long l)
Sets the total oscillation time.
|
void |
Update(MmgVector2 v)
Updates the current pulse state.
|
public MmgPulse(int startDir, long totalMs, double chng, MmgVector2 blS)
startDir
- The oscillation start direction.totalMs
- The total milliseconds to use for the entire oscillation.chng
- The change to apply to the object.blS
- A baseline scaling value.public int GetDirection()
public void SetDirection(int d)
d
- The direction of the oscillation.public long GetTimeFlip()
public void SetTimeFlip(long l)
l
- The oscillation time flip.public long GetTimeTotal()
public void SetTimeTotal(long l)
l
- The total oscillation time.public long GetTimeStart()
public void SetTimeStart(long l)
l
- The oscillation start time.public double GetChange()
public void SetChange(double c)
c
- The rate of change.public void Update(MmgVector2 v)
v
- The current object position.