C# Class UMD.HCIL.Piccolo.Activities.PActivityScheduler

PActivityScheduler is responsible for managing a list of activities to be processed.
PActivityScheduler is given a chance to process these activities from the PRoot's ProcessInputs() method. Most users will not need to use the PActivityScheduler directly, instead you should look at:
  • PNode.AddActivity - to schedule a new activity
  • PActivity.Terminate - to terminate a running activity
  • PRoot.ProcessInputs - already calls processActivities for you.
显示文件 Open project: ME3Explorer/ME3Explorer Class Usage Examples

Public Methods

Method Description
AddActivity ( UMD.HCIL.Piccolo.Activities.PActivity activity ) : void

Add this activity to the scheduler.

Adding an activity schedules that activity to run at some point in the future.

AddActivity ( UMD.HCIL.Piccolo.Activities.PActivity activity, bool processLast ) : void

Add this activity to the scheduler.

Adding an activity schedules that activity to run at some point in the future.

Sometimes it's useful to make sure that an activity is run after all other activities have been run. To do this set processLast to true when adding the activity.

PActivityScheduler ( UMD.HCIL.Piccolo.PRoot rootNode ) : System

Constructs a new PActivityScheduler.

ProcessActivities ( long currentTime ) : void

Process all scheduled activities for the given time. Each activity is given one "step", equivalent to one frame of animation.

RemoveActivity ( UMD.HCIL.Piccolo.Activities.PActivity activity ) : void

Remove this activity from the scheduler.

Once an activity has been removed from the scheduler, it will no longer be run.

RemoveAllActivities ( ) : void

Removes all activities currently scheduled to run.

This method clears the scheduler.

Protected Methods

Method Description
StartActivityTimer ( ) : void

Starts the timer that controls the stepping of activities.

StepActivities ( object sender, EventArgs eArgs ) : void

Steps all running activities by calling the root's ProcessInputs, which in turn will call ProcessActivities.

StopActivityTimer ( ) : void

Stops the timer that controls the stepping of activities.

Method Details

AddActivity() public method

Add this activity to the scheduler.
Adding an activity schedules that activity to run at some point in the future.
public AddActivity ( UMD.HCIL.Piccolo.Activities.PActivity activity ) : void
activity UMD.HCIL.Piccolo.Activities.PActivity The activity to be added.
return void

AddActivity() public method

Add this activity to the scheduler.
Adding an activity schedules that activity to run at some point in the future.

Sometimes it's useful to make sure that an activity is run after all other activities have been run. To do this set processLast to true when adding the activity.

public AddActivity ( UMD.HCIL.Piccolo.Activities.PActivity activity, bool processLast ) : void
activity UMD.HCIL.Piccolo.Activities.PActivity The activity to be added.
processLast bool /// Specifies whether the activity should be run last. ///
return void

PActivityScheduler() public method

Constructs a new PActivityScheduler.
public PActivityScheduler ( UMD.HCIL.Piccolo.PRoot rootNode ) : System
rootNode UMD.HCIL.Piccolo.PRoot The root node to associate with this activity scheduler.
return System

ProcessActivities() public method

Process all scheduled activities for the given time. Each activity is given one "step", equivalent to one frame of animation.
public ProcessActivities ( long currentTime ) : void
currentTime long The time for which to process each activity.
return void

RemoveActivity() public method

Remove this activity from the scheduler.
Once an activity has been removed from the scheduler, it will no longer be run.
public RemoveActivity ( UMD.HCIL.Piccolo.Activities.PActivity activity ) : void
activity UMD.HCIL.Piccolo.Activities.PActivity The activity to be removed.
return void

RemoveAllActivities() public method

Removes all activities currently scheduled to run.
This method clears the scheduler.
public RemoveAllActivities ( ) : void
return void

StartActivityTimer() protected method

Starts the timer that controls the stepping of activities.
protected StartActivityTimer ( ) : void
return void

StepActivities() protected method

Steps all running activities by calling the root's ProcessInputs, which in turn will call ProcessActivities.
protected StepActivities ( object sender, EventArgs eArgs ) : void
sender object The source of this Tick Event.
eArgs System.EventArgs The arguments for this Tick Event.
return void

StopActivityTimer() protected method

Stops the timer that controls the stepping of activities.
protected StopActivityTimer ( ) : void
return void