Squeak Class Documentation category index | class index  
 
Scheduler
  category: Balloon3D-Wonderland Time
  superclass: Object
  subclasses:

The Scheduler manages time for a Wonderland. As part of this responsibility, it manages active alarms, actions, and animations in the Wonderland.

instance methods
  animated object
  getActionsFor:
getAnimationsFor:

  initialize-release
  initialize
reset

  lists maintenance
  addAction:
addAlarm:
addAnimation:
getActions
getAlarms
getAnimations
removeAction:
removeAlarm:
removeAnimation:

  ticking
  getElapsedTime
getFPS
getTime
incrementBy:
pause
processActions
processAlarms
processAnimations
resume
setSpeed:
tick

class methods
  initialize
  new

instance methods
  animated object top  
 

getActionsFor:

Return the animations that list anObject as the object they're affecting


 

getAnimationsFor:

Return the animations that list anObject as the object they're affecting


  initialize-release top  
 

initialize

Initializes the scheduler: sets Wonderland time to 0, creates empty lists for actions, alarms, and animations


 

reset

Clears the animation, action, and alarm lists and resets the Wonderland time to 0


  lists maintenance top  
 

addAction:

Add an action to the Scheduler's list of actions


 

addAlarm:

Add an alarm to the Scheduler's list of alarms


 

addAnimation:

Add an animation to the Scheduler's list of animations


 

getActions

Returns a copy of the Scheduler's list of actions


 

getAlarms

Returns a copy of the Scheduler's list of alarms


 

getAnimations

Returns a copy of the Scheduler's list of animations


 

removeAction:

Remove an action from the Scheduler's list of actions


 

removeAlarm:

Remove an alarm from the Scheduler's list of alarms


 

removeAnimation:

Remove an animation from the Scheduler's list of animations


  ticking top  
 

getElapsedTime

Returns the time that elapsed in the last Scheduler tick


 

getFPS

Returns the instantaneous frames per second (1 / elapsedTime)


 

getTime

Returns the current scheduler time


 

incrementBy:

This method allows animations to be stepped through; the user pauses the Scheduler and then repeatedly issues incrementBy messages with the desired increment


 

pause

Pause the scheduler. All alarms, actions, and animations pause and time stops passing in the Wonderland, but any active cameras continue to render.


 

processActions

This method executes every active action and removes any that done


 

processAlarms

This method checks all the alarms and processes any that have gone off


 

processAnimations

This method processes any active Animations and removes any that are completed.


 

resume

If the scheduler was paused, resume it.


 

setSpeed:

This method sets the speed for the Scheduler. 1 is a 1:1 mapping with clock time, 2 is a 2:1 mapping, etc.


 

tick

Figure out how much time has elapsed since the last Scheduler tick and update all our actions, alarms, and animations


class methods
  initialize top  
 

new

Creates a new Scheduler and make sure it gets initialized.