Revision 34e43b0a
Added by Leszek Koltunski about 5 years ago
src/main/java/org/distorted/library/main/DistortedEffects.java | ||
---|---|---|
194 | 194 |
|
195 | 195 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
196 | 196 |
/** |
197 |
* Add a new Effect to our queue. |
|
197 |
* Add a new Effect to the tail of our queue.
|
|
198 | 198 |
* |
199 | 199 |
* @param effect The Effect to add. |
200 | 200 |
* @return <code>true</code> if operation was successful, <code>false</code> otherwise. |
... | ... | |
204 | 204 |
int num = effect.getType().ordinal(); |
205 | 205 |
return mQueues[num].add(effect); |
206 | 206 |
} |
207 |
|
|
208 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
209 |
/** |
|
210 |
* Add a new Effect to our queue at a specified position. |
|
211 |
* |
|
212 |
* @param effect The Effect to add. |
|
213 |
* @param position the place in the effects queue where to add the new effect. |
|
214 |
* @return <code>true</code> if operation was successful, <code>false</code> otherwise. |
|
215 |
*/ |
|
216 |
public boolean apply(Effect effect, int position) |
|
217 |
{ |
|
218 |
int num = effect.getType().ordinal(); |
|
219 |
return mQueues[num].add(effect,position); |
|
220 |
} |
|
207 | 221 |
} |
Also available in: Unified diff
Progress with DistortedCube.