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.
Afficher le fichier Open project: ME3Explorer/ME3Explorer Class Usage Examples

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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 méthode

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.
Résultat void

AddActivity() public méthode

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. ///
Résultat void

PActivityScheduler() public méthode

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.
Résultat System

ProcessActivities() public méthode

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.
Résultat void

RemoveActivity() public méthode

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.
Résultat void

RemoveAllActivities() public méthode

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

StartActivityTimer() protected méthode

Starts the timer that controls the stepping of activities.
protected StartActivityTimer ( ) : void
Résultat void

StepActivities() protected méthode

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.
Résultat void

StopActivityTimer() protected méthode

Stops the timer that controls the stepping of activities.
protected StopActivityTimer ( ) : void
Résultat void