|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.io.SimpleStreamableObject
com.threerings.tudey.data.effect.Effect
public class Effect
Represents a stateless event occurring within the scene.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
Streamable.Closure |
| Field Summary | |
|---|---|
protected int |
_clientOid
The oid of the client on which the effect was prefired, if any. |
protected ConfigReference<EffectConfig> |
_config
The effect configuration. |
protected EffectConfig.Original |
_original
The cached config implementation. |
protected float |
_rotation
The effect's rotation angle. |
protected EntityKey |
_target
The entity upon which to fire the effect, if any. |
protected int |
_timestamp
The time at which the effect was fired. |
protected Vector2f |
_translation
The effect's translation. |
protected static EffectConfig.Original |
NULL_ORIGINAL
Used when we can't resolve the effect config. |
| Constructor Summary | |
|---|---|
Effect()
No-arg constructor for deserialization. |
|
Effect(ConfigReference<EffectConfig> config,
int timestamp,
EntityKey target,
Vector2f translation,
float rotation)
Creates a new effect. |
|
| Method Summary | |
|---|---|
int |
getClientOid()
Returns the oid of the client that (may have) prefired the effect. |
ConfigReference<EffectConfig> |
getConfig()
Returns the effect's config reference. |
int |
getExpiry()
Returns the time at which this effect expires. |
void |
getPreloads(ConfigManager cfgmgr,
PreloadableSet preloads)
Adds the resources to preload for this effect into the provided set. |
float |
getRotation()
Returns the effect's rotation angle. |
EntityKey |
getTarget()
Returns the target of the effect (if any). |
int |
getTimestamp()
Returns the time at which the effect was fired. |
Vector2f |
getTranslation()
Returns a reference to the effect's translation vector. |
void |
init(ConfigManager cfgmgr)
Gives the effect a chance to resolve and cache configuration data after being created or deserialized. |
void |
setClientOid(int clientOid)
Sets the oid of the client that (may have) prefired the effect, or zero for none. |
| Methods inherited from class com.threerings.io.SimpleStreamableObject |
|---|
toString, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected ConfigReference<EffectConfig> _config
protected int _timestamp
protected EntityKey _target
protected Vector2f _translation
protected float _rotation
protected int _clientOid
protected transient EffectConfig.Original _original
protected static final EffectConfig.Original NULL_ORIGINAL
| Constructor Detail |
|---|
public Effect(ConfigReference<EffectConfig> config,
int timestamp,
EntityKey target,
Vector2f translation,
float rotation)
public Effect()
| Method Detail |
|---|
public void init(ConfigManager cfgmgr)
public void getPreloads(ConfigManager cfgmgr,
PreloadableSet preloads)
public ConfigReference<EffectConfig> getConfig()
public int getTimestamp()
public EntityKey getTarget()
public Vector2f getTranslation()
public float getRotation()
public int getExpiry()
public void setClientOid(int clientOid)
Prefireable
setClientOid in interface Prefireablepublic int getClientOid()
Prefireable
getClientOid in interface Prefireable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||