com.threerings.tudey.config
Class ActorConfig.Original

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

public static class ActorConfig.Original
extends ActorConfig.Implementation

Superclass of the original implementations.


Field Summary
 int collisionFlags
          Determines which collision categories the actor belongs to.
 int collisionMask
          Determines which collision categories the actor collides with.
 boolean defaultEntrance
          Whether or not the actor should be used as a default entrance.
 HandlerConfig[] handlers
          The actor's event handlers.
 boolean isStatic
          Whether or not the actor is "static" (always in clients' area of interest, notifies the scene manager when its state changes).
 ShapeConfig shape
          The shape of the actor.
 int spawnAdjustMask
          Used as the collision mask when adjusting a spawn point and determining if it's reachable from the original spawn point.
 int spawnMask
          If non-zero, the spawn point will be adjusted so that the actor doesn't collide with anything that matches the mask (if possible).
 ActorSpriteConfig sprite
          The type of sprite to use for the actor.
 TagConfig tags
          Tags used to identify the actor within the scene.
 
Constructor Summary
ActorConfig.Original()
           
 
Method Summary
 Actor createActor(ConfigReference<ActorConfig> config, int id, int created, Vector2f translation, float rotation)
          Creates a new actor of the type associated with this config.
 String getLogicClassName()
          Returns the name of the server-side logic class to use for the actor.
 ActorConfig.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 actor into the provided set.
 ActorSprite.Implementation getSpriteImplementation(TudeyContext ctx, Scope scope, ActorSprite.Implementation impl)
          Creates or updates a sprite implementation for this configuration.
 void invalidate()
          Invalidates any cached data.
 
Methods inherited from class com.threerings.tudey.config.ActorConfig.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 ActorSpriteConfig sprite
The type of sprite to use for the actor.


shape

@Editable
public ShapeConfig shape
The shape of the actor.


tags

@Editable
public TagConfig tags
Tags used to identify the actor within the scene.


handlers

@Editable
public HandlerConfig[] handlers
The actor's event handlers.


isStatic

@Editable
@Strippable
public boolean isStatic
Whether or not the actor is "static" (always in clients' area of interest, notifies the scene manager when its state changes).


defaultEntrance

@Editable(hgroup="d")
@Strippable
public boolean defaultEntrance
Whether or not the actor should be used as a default entrance.


spawnMask

@Editable(editor="mask",
          mode="collision",
          hgroup="d")
@Strippable
public int spawnMask
If non-zero, the spawn point will be adjusted so that the actor doesn't collide with anything that matches the mask (if possible).


spawnAdjustMask

@Editable(editor="mask",
          mode="collision",
          hgroup="d")
@Strippable
public int spawnAdjustMask
Used as the collision mask when adjusting a spawn point and determining if it's reachable from the original spawn point.


collisionFlags

@Editable(editor="mask",
          mode="collision",
          hgroup="c")
public int collisionFlags
Determines which collision categories the actor belongs to.


collisionMask

@Editable(editor="mask",
          mode="collision",
          hgroup="c")
public int collisionMask
Determines which collision categories the actor collides with.

Constructor Detail

ActorConfig.Original

public ActorConfig.Original()
Method Detail

getLogicClassName

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


createActor

public Actor createActor(ConfigReference<ActorConfig> config,
                         int id,
                         int created,
                         Vector2f translation,
                         float rotation)
Creates a new actor of the type associated with this config.


getPreloads

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


getOriginal

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

Specified by:
getOriginal in class ActorConfig.Implementation

getSpriteImplementation

public ActorSprite.Implementation getSpriteImplementation(TudeyContext ctx,
                                                          Scope scope,
                                                          ActorSprite.Implementation impl)
Description copied from class: ActorConfig.Implementation
Creates or updates a sprite implementation for this configuration.

Specified by:
getSpriteImplementation in class ActorConfig.Implementation
scope - the actor's expression scope.
impl - an existing implementation to reuse, if possible.
Returns:
either a reference to the existing implementation (if reused), a new implementation, or null if no implementation could be created.

invalidate

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

Overrides:
invalidate in class ActorConfig.Implementation


Copyright © 2011. All Rights Reserved.