com.threerings.tudey.server.logic
Class ActionLogic

java.lang.Object
  extended by com.threerings.util.ShallowObject
      extended by com.threerings.tudey.server.logic.Logic
          extended by com.threerings.tudey.server.logic.ActionLogic
Direct Known Subclasses:
ActionLogic.AbstractMove, ActionLogic.Compound, ActionLogic.Conditional, ActionLogic.Delayed, ActionLogic.ExpressionSwitch, ActionLogic.FireEffect, ActionLogic.Random, ActionLogic.SpawnActor, ActionLogic.Switch, ActionLogic.Targeted

public abstract class ActionLogic
extends Logic

Handles the server-side processing for an action.


Nested Class Summary
static class ActionLogic.AbstractMove
          Superclass of the move logic classes.
static class ActionLogic.Compound
          Handles a compound action.
static class ActionLogic.Conditional
          Handles a conditional action.
static class ActionLogic.Delayed
          Handles a delayed action.
static class ActionLogic.DestroyActor
          Handles a destroy actor action.
static class ActionLogic.ExpressionSwitch
          Handles an expression switch action.
static class ActionLogic.FireEffect
          Handles a fire effect action.
static class ActionLogic.ForceClientAction
          Handles a force client action...
static class ActionLogic.MoveAll
          Handles a move all action.
static class ActionLogic.MoveBody
          Handles a move body action.
static class ActionLogic.Random
          Handles a random action.
static class ActionLogic.SetFlag
          Handles a set flag action.
static class ActionLogic.SetVariable
          Handles a set variable action.
static class ActionLogic.Signal
          Handles a signal action.
static class ActionLogic.SpawnActor
          Handles a spawn actor action.
static class ActionLogic.SpawnRandomTranslatedActor
          Handles a spawn random translated actor action.
static class ActionLogic.SpawnRotatedActor
          Handles a spawn rotated actor action.
static class ActionLogic.SpawnTransformedActor
          Handles a spawn transformed actor action.
static class ActionLogic.StepLimitMobile
          Handles a step limit mobile action.
static class ActionLogic.Switch
          Handles a switch action.
static class ActionLogic.Targeted
          Simple base class for actions with targets.
static class ActionLogic.WarpActor
          Handles a warp actor action.
static class ActionLogic.WarpTransformedActor
          Handles a warp transformed actor action.
 
Nested classes/interfaces inherited from class com.threerings.tudey.server.logic.Logic
Logic.ShapeObserver
 
Constructor Summary
ActionLogic()
           
 
Method Summary
abstract  boolean execute(int timestamp, Logic activator)
          Executes the action.
 EntityKey getEntityKey()
          Returns the entity key for this logic, if any.
 float getRotation()
          Returns the rotation of this logic for the purpose of spawning actors, etc.
 Vector2f getTranslation()
          Returns the translation of this logic for the purpose of spawning actors, etc.
 void init(TudeySceneManager scenemgr, ActionConfig config, Logic source)
          Initializes the logic.
 boolean isActive()
          Determines whether this logic object is still active in the scene.
 void removed()
          Notes that the action has been removed.
 boolean shouldExecute(Logic activator)
          Provides a hint as to whether this action should be executed.
 
Methods inherited from class com.threerings.tudey.server.logic.Logic
addShapeObserver, getModel, getPatrolPath, getSceneManager, getShape, getTags, getTransform, getTransform, getVariable, init, isDefaultEntrance, isVisible, removeShapeObserver, request, resolveTarget, setVariable, signal, transfer
 
Methods inherited from class com.threerings.util.ShallowObject
equals, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionLogic

public ActionLogic()
Method Detail

init

public void init(TudeySceneManager scenemgr,
                 ActionConfig config,
                 Logic source)
Initializes the logic.


removed

public void removed()
Notes that the action has been removed.


shouldExecute

public boolean shouldExecute(Logic activator)
Provides a hint as to whether this action should be executed.


execute

public abstract boolean execute(int timestamp,
                                Logic activator)
Executes the action.

Parameters:
activator - the entity that triggered the action.
Returns:
true of the action completed successfully

isActive

public boolean isActive()
Description copied from class: Logic
Determines whether this logic object is still active in the scene.

Overrides:
isActive in class Logic

getEntityKey

public EntityKey getEntityKey()
Description copied from class: Logic
Returns the entity key for this logic, if any.

Overrides:
getEntityKey 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


Copyright © 2011. All Rights Reserved.