|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpslib.GenericParticle
pslib.DynamicParticle
pslib.GenericEmitter
pslib.TargetEmitter
public class TargetEmitter
TargetEmitter Class
The TargetEmitter class extends the functionality of the GenericEmitter class by incorporating target seeking; attached particles will seek out the nearest attached target.
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library. If not, see http://www.gnu.org/licenses/.
Field Summary |
---|
Fields inherited from interface pslib.PSConstants |
---|
CAM2D_LOOK, CAM2D_RIGHT, CAM2D_UP, CORNER, INVERSE, INVERSE_TRIANGULAR, LEADING, LINEAR, MIDPOINT, NONE, STATIC, TRAILING, TRIANGULAR |
Constructor Summary | |
---|---|
TargetEmitter(int b)
Create a new object instance with the specified buffer size |
|
TargetEmitter(int b,
int d)
Create a new object instance with the specified buffer size and decay time |
Method Summary | |
---|---|
TargetEmitter |
copy()
Return a copy of this emitter |
AttractiveForce[] |
getTargets()
Return a reference to this objects targets |
void |
setTargets(AttractiveForce[] t)
Set the targets for this object |
protected void |
updateParticle(DynamicParticle p)
Update the specified particle |
Methods inherited from class pslib.GenericEmitter |
---|
attach, attach, attachedParticles, clear, clearForces, debug, debug, getBufferSize, getDimensionScalars, getEmissionVector, getRadialVector, isDead, map, remove, render, render, setAlpha, setBufferSize, setColour, setColour, setColour, setColour, setDimensionScalars, setDirection, setDirectionMode, setForces, setForces, setInitialVelocity, setInitialVelocity, setMaxVelocity, setParticleStealing, setRadius, setRadius, setSpeed, setSpread, toArray, update |
Methods inherited from class pslib.DynamicParticle |
---|
clearBehaviour, getBehaviour, getDecay, getDecayTime, getInitialDecayTime, getMass, getRenderAlpha, getRenderSize, getSnapshot, isDynamic, map, setAlphaEnvelope, setBehaviour, setBehaviour, setDecayTime, setMass, setSizeEnvelope |
Methods inherited from class pslib.GenericParticle |
---|
getAlpha, getColour, getPosition, getSize, getVelocity, setPosition, setSize, setVelocity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TargetEmitter(int b)
b
- buffer sizepublic TargetEmitter(int b, int d)
b
- buffer sized
- decay (ms)Method Detail |
---|
public final void setTargets(AttractiveForce[] t)
t
- targetspublic final AttractiveForce[] getTargets()
public TargetEmitter copy()
The returned copy contains references to the target vectors within the source emitter and will adhere to the rules defined in the GenericEmitter map() function.
copy
in class GenericEmitter
GenericEmitter
protected void updateParticle(DynamicParticle p)
updateParticle
in class GenericEmitter
p
- particle
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |