|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.wisch.joystick.ffeffect.Effect
at.wisch.joystick.ffeffect.ExtendedEffect
at.wisch.joystick.ffeffect.RampEffect
public class RampEffect
The Class RampEffect. RampEffect is similar to ConstantEffect, but it has
different levels at beginning and end: it linearly increases or decreases the
level.
Note: If you use attack and fade with a RampEffect the effects get added to
the ramp effect making the effect become quadratic instead of linear.
ConstantEffect| Field Summary |
|---|
| Fields inherited from class at.wisch.joystick.ffeffect.Effect |
|---|
EFFECT_CONSTANT, EFFECT_CUSTOM, EFFECT_DAMPER, EFFECT_FRICTION, EFFECT_INERTIA, EFFECT_RAMP, EFFECT_SAWTOOHDOWN, EFFECT_SAWTOOTHUP, EFFECT_SINE, EFFECT_SPRING, EFFECT_SQUARE, EFFECT_TRIANGLE, INFINITE_LENGTH, MAX_DELAY, MAX_LENGTH, MAX_LEVEL, MIN_LEVEL, NO_BUTTON |
| Constructor Summary | |
|---|---|
RampEffect()
Instantiates a new RampEffect with default parameters. |
|
RampEffect(Direction direction,
int effectLength,
int effectDelay,
int buttonIndex,
int buttonInterval,
int attackLength,
int fadeLength,
int attackLevel,
int fadeLevel,
int startLevel,
int endLevel)
Instantiates a new RampEffect with the specified parameters. |
|
| Method Summary | |
|---|---|
int |
getEndLevel()
Gets the level (the strength) at the end of the effect. |
java.lang.String |
getName()
Gets the effect type as a String. |
int |
getStartLevel()
Gets the level (the strength) of the effect at the beginning. |
int |
getStrength()
Gets the strength. |
void |
setEffectLength(int effectLength)
Sets the effect length in ms. |
void |
setEndLevel(int endLevel)
Sets the level (the strength) at the end of the effect. |
void |
setStartLevel(int startLevel)
Sets the level (the strength) at the beginning of the effect. |
void |
setStrength(int strength)
Sets the strength for an effect. |
| Methods inherited from class at.wisch.joystick.ffeffect.ExtendedEffect |
|---|
getAttackLength, getAttackLevel, getDirection, getFadeLength, getFadeLevel, setAttackLength, setAttackLevel, setDirection, setFadeLength, setFadeLevel |
| Methods inherited from class at.wisch.joystick.ffeffect.Effect |
|---|
getButtonIndex, getButtonInterval, getDefaultDirection, getEffectDelay, getEffectLength, getEffectType, setButtonIndex, setButtonInterval, setDefaultDirection, setEffectDelay |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RampEffect(Direction direction,
int effectLength,
int effectDelay,
int buttonIndex,
int buttonInterval,
int attackLength,
int fadeLength,
int attackLevel,
int fadeLevel,
int startLevel,
int endLevel)
direction - a Direction objecteffectLength - the effect length in mseffectDelay - the delay before the effect starts in msbuttonIndex - the trigger button index (or NO_BUTTON)buttonInterval - the trigger button interval in msattackLength - the attack length (fade-in) in msfadeLength - the fade length (fade-out) in msattackLevel - the level from where to start the fade-infadeLevel - the level where the fade-out fades tostartLevel - the level (the strength) at the beginning of the effectendLevel - the level (the strength) at the end of the effectRampEffect()public RampEffect()
RampEffect(Direction, int, int, int, int, int, int, int, int, int,
int)| Method Detail |
|---|
public void setEffectLength(int effectLength)
setEffectLength in class EffecteffectLength - the new effect length (an int from 0 to MAX_LENGTH (360000000
ms ))Effect.getEffectLength()public java.lang.String getName()
getName in class EffectEffect.getEffectType()public int getStartLevel()
setStartLevel(int),
getEndLevel()public void setStartLevel(int startLevel)
startLevel - the new level (strength) at the beginning of the effect (an
int from MIN_LEVEL (-32768) to MAX_LEVEL (32767))getStartLevel(),
setEndLevel(int)public int getEndLevel()
setEndLevel(int),
getStartLevel()public void setEndLevel(int endLevel)
endLevel - the new level (strength) at the end of the effect (an int from
MIN_LEVEL (-32768) to MAX_LEVEL (32767))getEndLevel(),
setStartLevel(int)public int getStrength()
getStrength in class EffectgetEndLevel()public void setStrength(int strength)
setStrength in class Effectstrength - the new strength (an int from 0 to MAX_LEVEL (32767))setEndLevel(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||