Class Index | File Index

Classes


Class com.jiffeegames.Scheduler.Rule


Defined in: jiffee-scheduler.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
addExactMatch(prop, value)
Specify that a rule only matches if a property in the event has a specific value.
 
Specify that a rule only matches if a property is NOT present in the event.
 
Specify that a rule only matches if a property IS present in the event.
 
match(event)
Try to match a rule to an event.
 
setAction(action)
Specify the action that should be performed if a rule matches.
 
setPriority(priority)
Set the priority at which a rule will try to match.
Class Detail
com.jiffeegames.Scheduler.Rule()
Method Detail
{Rule} addExactMatch(prop, value)
Specify that a rule only matches if a property in the event has a specific value. Example call:
rule.addExactMatch('verb', 'jump');
Parameters:
prop
value
Returns:
The rule, to allow call-chaining.

{Rule} addRejected(prop)
Specify that a rule only matches if a property is NOT present in the event. Example call:
rule.addRejected('direct');  // must be an intransitive verb
Parameters:
prop
Returns:
The rule, to allow call-chaining.

{Rule} addRequired(prop)
Specify that a rule only matches if a property IS present in the event. Example call:
rule.addRequired('direct');  // verb must be transitive
Parameters:
prop
Returns:
The rule, to allow call-chaining.

{Rule} match(event)
Try to match a rule to an event. Example call:
if (rule.match(event)) ...
Parameters:
event
Returns:
true if it matches, false if it does not.

{Rule} setAction(action)
Specify the action that should be performed if a rule matches. Example call:
rule.setAction("A bright flash momentarily blinds you.");
Parameters:
action
Returns:
The rule, to allow call-chaining.

{Rule} setPriority(priority)
Set the priority at which a rule will try to match. Example call:
rule.setPriority('before-jumping');
Parameters:
priority
Returns:
The rule, to allow call-chaining.

Documentation generated by JsDoc Toolkit 2.3.2 on Sun Jul 25 2010 13:49:31 GMT-0700 (PDT)