|
||||||||||
| 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.ConstantEffect
public class ConstantEffect
The Class ConstantEffect. The most simple type of effect. It has a constant
level of strength, and optional fade-in and fade-out.
Here we have an example of a constant effect evolution in time:
Strength
ˆ
|
| effect level --> _________________
| / \
| / \
| / \
| / \
| attack level --> | \
| | | <--- fade level
| | |
+--------------------------------------------------> Time
[--] [---]
attack length fade length
[-----------------][------------------------]
delay length
Note that either the attack level or the fade level may be above the effect
level.
Effect,
Direction| 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 | |
|---|---|
ConstantEffect()
Instantiates a new ConstantEffect with default parameters. |
|
ConstantEffect(Direction direction,
int effectLength,
int effectDelay,
int buttonIndex,
int buttonInterval,
int attackLength,
int fadeLength,
int attackLevel,
int fadeLevel,
int level)
Instantiates a new ConstantEffect with the specified parameters. |
|
| Method Summary | |
|---|---|
int |
getLevel()
Gets the level (the strength) of the effect. |
java.lang.String |
getName()
Gets the effect type as a String. |
int |
getStrength()
Gets the strength. |
void |
setLevel(int level)
Sets the level (the strength) 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, setEffectLength |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConstantEffect(Direction direction,
int effectLength,
int effectDelay,
int buttonIndex,
int buttonInterval,
int attackLength,
int fadeLength,
int attackLevel,
int fadeLevel,
int level)
direction - a Direction objecteffectLength - the effect length in ms (or INFINITE_LENGTH)effectDelay - 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 tolevel - the level (the strength) of the effectConstantEffect()public ConstantEffect()
ConstantEffect(Direction, int, int, int, int, int, int, int, int,
int)| Method Detail |
|---|
public int getLevel()
setLevel(int)public void setLevel(int level)
level - the new level (strength) of the effect (an int from MIN_LEVEL
(-32768) to MAX_LEVEL (32767))getLevel()public int getStrength()
getStrength in class EffectgetLevel()public void setStrength(int strength)
setStrength in class Effectstrength - the new strength (an int from 0 to MAX_LEVEL (32767))setLevel(int)public java.lang.String getName()
getName in class EffectEffect.getEffectType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||