gillcup.action

[XXX]

class gillcup.action.Action[source]

Something that can be scheduled: a discrete event.

Also, other Actions can be chained to it. These will be run when the “parent” Action, or an effect applied by it, finishes.

Actions may not be callable. If they are, they won’t be scheduled as actions.

chain(action, *others, **kwargs)[source]

Schedule an Action (or more) at the end of this Action

The dt argument can be given to delay the runnin of the execution by the specified time.

For EffectAction, the actions are scheduled after the applied effect ends.

If this action has already finished, the chained ones are scheduled immediately.

delay(dt)[source]

Schedule a null action at time dt (useful in chaining)

run(timer)[source]

Run this action.

Called from a Timer.

class gillcup.action.EffectAction(effect, *args, **kwargs)[source]

An Action that applies an effect when run

effect is applied when this Action is run; the timer, args and kwargs are passed to it.

args should be the object and attribute to apply the Effect to.

class gillcup.action.FunctionAction(func, *args, **options)[source]

An Action that executes a function when run

func is called when this Action is run; args are passed to it

Additional options:

  • kwargs: a dict of named arguments to pass to the function
  • passTimer: if True, the timer will be passed as an additional named argument
class gillcup.action.WaitForAll(*actions)[source]

An Action that waits for other actions, and runs when they all are run

class gillcup.action.WaitForAny(*actions)[source]

An Action that waits for other actions, and runs when any of them is run

Project Versions

Previous topic

gillcup.timer

Next topic

gillcup.animatedobject

This Page