com.threerings.tudey.config
Class EffectConfig.Original

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.tudey.config.EffectConfig.Implementation
          extended by com.threerings.tudey.config.EffectConfig.Original
All Implemented Interfaces:
Exportable, Copyable, Cloneable
Enclosing class:
EffectConfig

public static class EffectConfig.Original
extends EffectConfig.Implementation

Superclass of the original implementations.


Field Summary
 ActionConfig action
          The action associated with the effect, if any.
 int lifespan
          The lifespan of the effect.
 ShapeConfig shape
          The shape of the effect.
 EffectSpriteConfig sprite
          The type of sprite to use for the effect.
 boolean targetOnly
          If true, only show the effect to its target.
 
Constructor Summary
EffectConfig.Original()
           
 
Method Summary
 Effect createEffect(ConfigReference<EffectConfig> config, int timestamp, EntityKey target, Vector2f translation, float rotation)
          Creates a new effect of the type associated with this config.
 EffectSprite.Implementation createSpriteImplementation(TudeyContext ctx, Scope scope, Effect effect)
          Creates a sprite implementation for this configuration.
 String getLogicClassName()
          Returns the name of the server-side logic class to use for the effect.
 EffectConfig.Original getOriginal(ConfigManager cfgmgr)
          Returns a reference to the config's underlying original implementation.
 void getPreloads(ConfigManager cfgmgr, PreloadableSet preloads)
          Adds the resources to preload for this effect into the provided set.
 void invalidate()
          Invalidates any cached data.
 
Methods inherited from class com.threerings.tudey.config.EffectConfig.Implementation
getUpdateReferences
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

sprite

@Editable
public EffectSpriteConfig sprite
The type of sprite to use for the effect.


shape

@Editable
public ShapeConfig shape
The shape of the effect.


action

@Editable(nullable=true)
public ActionConfig action
The action associated with the effect, if any.


lifespan

@Editable(min=0.0,
          hgroup="l")
public int lifespan
The lifespan of the effect.


targetOnly

@Editable(hgroup="l")
public boolean targetOnly
If true, only show the effect to its target.

Constructor Detail

EffectConfig.Original

public EffectConfig.Original()
Method Detail

getLogicClassName

public String getLogicClassName()
Returns the name of the server-side logic class to use for the effect.


createEffect

public Effect createEffect(ConfigReference<EffectConfig> config,
                           int timestamp,
                           EntityKey target,
                           Vector2f translation,
                           float rotation)
Creates a new effect of the type associated with this config.


getPreloads

public void getPreloads(ConfigManager cfgmgr,
                        PreloadableSet preloads)
Adds the resources to preload for this effect into the provided set.


getOriginal

public EffectConfig.Original getOriginal(ConfigManager cfgmgr)
Description copied from class: EffectConfig.Implementation
Returns a reference to the config's underlying original implementation.

Specified by:
getOriginal in class EffectConfig.Implementation

createSpriteImplementation

public EffectSprite.Implementation createSpriteImplementation(TudeyContext ctx,
                                                              Scope scope,
                                                              Effect effect)
Description copied from class: EffectConfig.Implementation
Creates a sprite implementation for this configuration.

Specified by:
createSpriteImplementation in class EffectConfig.Implementation
scope - the effect's expression scope.
Returns:
the created implementation, or null if no implementation could be created.

invalidate

public void invalidate()
Description copied from class: EffectConfig.Implementation
Invalidates any cached data.

Overrides:
invalidate in class EffectConfig.Implementation


Copyright © 2011. All Rights Reserved.