com.threerings.tudey.server.logic
Class EffectLogic

java.lang.Object
  extended by com.threerings.util.ShallowObject
      extended by com.threerings.tudey.server.logic.Logic
          extended by com.threerings.tudey.server.logic.EffectLogic

public class EffectLogic
extends Logic

Handles an effect on the server.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.tudey.server.logic.Logic
Logic.ShapeObserver
 
Field Summary
protected  ActionLogic _action
          The effect action, if any.
protected  EffectConfig.Original _config
          The effect configuration.
protected  Effect _effect
          The effect fired.
protected  Shape _shape
          The shape of the effect.
protected  Logic _target
          The target of the effect (if any).
 
Fields inherited from class com.threerings.tudey.server.logic.Logic
_scenemgr, _variables
 
Constructor Summary
EffectLogic()
           
 
Method Summary
protected  Effect createEffect(ConfigReference<EffectConfig> ref, int timestamp, EntityKey target, Vector2f translation, float rotation)
          Creates the effect for this logic.
protected  void didInit()
          Override to perform custom initialization.
 Effect getEffect()
          Returns a reference to the effect fired.
 float getRotation()
          Returns the rotation of this logic for the purpose of spawning actors, etc.
 Shape getShape()
          Returns a reference to the shape of the effect.
 Vector2f getTranslation()
          Returns the translation of this logic for the purpose of spawning actors, etc.
 void init(TudeySceneManager scenemgr, ConfigReference<EffectConfig> ref, EffectConfig.Original config, int timestamp, Logic target, Vector2f translation, float rotation)
          Initializes the logic.
 boolean isVisible(ActorLogic actor)
          Determines whether this logic object is "visible" to the specified actor.
 
Methods inherited from class com.threerings.tudey.server.logic.Logic
addShapeObserver, createAction, createCondition, createExpression, createHandler, createRegion, createTarget, getEntityKey, getModel, getPatrolPath, getSceneManager, getTags, getTransform, getTransform, getVariable, init, isActive, isDefaultEntrance, removeShapeObserver, request, resolveTarget, setVariable, signal, transfer
 
Methods inherited from class com.threerings.util.ShallowObject
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_config

protected EffectConfig.Original _config
The effect configuration.


_effect

protected Effect _effect
The effect fired.


_target

protected Logic _target
The target of the effect (if any).


_shape

protected Shape _shape
The shape of the effect.


_action

protected ActionLogic _action
The effect action, if any.

Constructor Detail

EffectLogic

public EffectLogic()
Method Detail

init

public void init(TudeySceneManager scenemgr,
                 ConfigReference<EffectConfig> ref,
                 EffectConfig.Original config,
                 int timestamp,
                 Logic target,
                 Vector2f translation,
                 float rotation)
Initializes the logic.


getEffect

public Effect getEffect()
Returns a reference to the effect fired.


getShape

public Shape getShape()
Returns a reference to the shape of the effect.

Overrides:
getShape in class Logic

isVisible

public boolean isVisible(ActorLogic actor)
Description copied from class: Logic
Determines whether this logic object is "visible" to the specified actor.

Overrides:
isVisible in class Logic

getTranslation

public Vector2f getTranslation()
Description copied from class: Logic
Returns the translation of this logic for the purpose of spawning actors, etc.

Overrides:
getTranslation in class Logic

getRotation

public float getRotation()
Description copied from class: Logic
Returns the rotation of this logic for the purpose of spawning actors, etc.

Overrides:
getRotation in class Logic

createEffect

protected Effect createEffect(ConfigReference<EffectConfig> ref,
                              int timestamp,
                              EntityKey target,
                              Vector2f translation,
                              float rotation)
Creates the effect for this logic.


didInit

protected void didInit()
Override to perform custom initialization.