Atavism Version 2018.1AGIS API

atavism.agis.objects
Class CoordinatedEffect

java.lang.Object
  extended by atavism.agis.objects.CoordinatedEffect

public class CoordinatedEffect
extends java.lang.Object

Use this class to configure and invoke coordinated effects scripts from the server.


Field Summary
protected  java.util.Map<java.lang.String,java.io.Serializable> argMap
           
protected  java.lang.String effectName
           
protected  boolean sendSrcOid
           
protected  boolean sendTargOid
           
 
Constructor Summary
CoordinatedEffect(java.lang.String effectName)
           
 
Method Summary
 java.util.HashMap<java.lang.String,java.io.Serializable> copyArgMap()
           
 CoordinatedEffectState generateStateObject(OID sourceOid, OID targetOid, Point loc, AgisAbilityState abilityState)
          this is an object factory. generates the CoordinatedEffectState object which is used when invoke() is called.
 java.lang.Object getArgument(java.lang.String argName)
          Get the value of an argument that will be passed to the effects script when it is invoked on the client.
 java.lang.String getEffectName()
          Get the name of the coordinated effect script to invoke.
 CoordinatedEffectState invoke(OID sourceOid, OID targetOid)
          Invokes a client coordinated effect script, originating with the sourceOid object and targetted at the targetOid object.
 CoordinatedEffectState invoke(OID sourceOid, OID targetOid, Point loc, AgisAbilityState abilityState)
           
 CoordinatedEffectState invoke(OID sourceOid, OID targetOid, Point loc, AgisAbilityState abilityState, java.lang.String iconName, java.lang.Boolean displayIcon)
           
 CoordinatedEffectState invoke(OID sourceOid, OID targetOid, java.lang.String iconName, java.lang.Boolean displayIcon)
           
 void putArgument(java.lang.String argName, java.io.Serializable argValue)
          Adds an argument that will be passed to the effects script when it is invoked on the client.
 boolean sendSourceOid()
          Sets whether to send the sourceOid parameter to the client coordinated effect script.
 void sendSourceOid(boolean val)
          Sets whether to send the sourceOid parameter to the client coordinated effect script.
 boolean sendTargetOid()
          Gets whether the targetOid parameter will be sent to the client coordinated effect script.
 void sendTargetOid(boolean val)
          Sets whether to send the targetOid parameter to the client coordinated effect script.
 void setEffectName(java.lang.String effectName)
          Sets the name of the coordinated effect script to invoke.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

effectName

protected java.lang.String effectName

argMap

protected java.util.Map<java.lang.String,java.io.Serializable> argMap

sendSrcOid

protected boolean sendSrcOid

sendTargOid

protected boolean sendTargOid
Constructor Detail

CoordinatedEffect

public CoordinatedEffect(java.lang.String effectName)
Method Detail

invoke

public CoordinatedEffectState invoke(OID sourceOid,
                                     OID targetOid)
Invokes a client coordinated effect script, originating with the sourceOid object and targetted at the targetOid object.

Parameters:
sourceOid - - Object ID of the object from which this coordinated effect originates.
targetOid - - Object ID of the target object.
Returns:
A CoordinatedEffect.State object that can be used to cancel or update the coordinated effect (not yet implemented).

invoke

public CoordinatedEffectState invoke(OID sourceOid,
                                     OID targetOid,
                                     java.lang.String iconName,
                                     java.lang.Boolean displayIcon)

invoke

public CoordinatedEffectState invoke(OID sourceOid,
                                     OID targetOid,
                                     Point loc,
                                     AgisAbilityState abilityState)

invoke

public CoordinatedEffectState invoke(OID sourceOid,
                                     OID targetOid,
                                     Point loc,
                                     AgisAbilityState abilityState,
                                     java.lang.String iconName,
                                     java.lang.Boolean displayIcon)

generateStateObject

public CoordinatedEffectState generateStateObject(OID sourceOid,
                                                  OID targetOid,
                                                  Point loc,
                                                  AgisAbilityState abilityState)
this is an object factory. generates the CoordinatedEffectState object which is used when invoke() is called. override this method to have customized state objects. abilityState can be null, this just means that the effectstate object will have no reference back to the abilityState.

Returns:
new CoordinatedEffectState

setEffectName

public void setEffectName(java.lang.String effectName)
Sets the name of the coordinated effect script to invoke.

Parameters:
effectName - - Name of the coordinated effect script.

getEffectName

public java.lang.String getEffectName()
Get the name of the coordinated effect script to invoke.

Returns:
- the name of the coordinated effect script invoked by this CoordinatedEffect..

putArgument

public void putArgument(java.lang.String argName,
                        java.io.Serializable argValue)
Adds an argument that will be passed to the effects script when it is invoked on the client.

Parameters:
argName - - Name of the script argument.
argValue - - Value of the argument. Must be one of: String, Boolean, Integer, Long, Float, Point, Quaternion.

getArgument

public java.lang.Object getArgument(java.lang.String argName)
Get the value of an argument that will be passed to the effects script when it is invoked on the client.

Parameters:
argName - - Name of the script argument.
Returns:
- Value of the argument.

copyArgMap

public java.util.HashMap<java.lang.String,java.io.Serializable> copyArgMap()

sendSourceOid

public void sendSourceOid(boolean val)
Sets whether to send the sourceOid parameter to the client coordinated effect script.

Parameters:
val - - Whether or not to send the sourceOid parameter to the client coordinated effect script.

sendSourceOid

public boolean sendSourceOid()
Sets whether to send the sourceOid parameter to the client coordinated effect script.

Returns:
whether or not to send the sourceOid parameter to the client coordinated effect script.

sendTargetOid

public void sendTargetOid(boolean val)
Sets whether to send the targetOid parameter to the client coordinated effect script.

Parameters:
val - - true if you want to send the taregetOid parameter to the client coordinated effect script.

sendTargetOid

public boolean sendTargetOid()
Gets whether the targetOid parameter will be sent to the client coordinated effect script.

Returns:
- true if you want to send the targetOid parameter to the client coordinated effect script; false otherwise.


Copyright © 2018 Dragonsan Studios Sp. z o.o.