C# Class Myre.Delayed

A static class containing methods for fire-and-forget delayed events and transitions.
Afficher le fichier Open project: TomGillen/Myre

Méthodes publiques

Méthode Description
Action ( System.Action action, float delay ) : void

Fires the spevified action after the specified number of seconds have elapsed.

Transition ( Action step, float duration ) : void

Calls the specified delegate every frame for the specified number of seconds.

Transition ( Action step, float duration, System.Action completionCallback ) : void

Calls the specified delegate every frame for the specified number of seconds, and then calls the specified callback delegate.

Update ( GameTime gameTime ) : void

Updates all transitions. This is called by MyreGame.Update(gameTime).

Method Details

Action() public static méthode

Fires the spevified action after the specified number of seconds have elapsed.
public static Action ( System.Action action, float delay ) : void
action System.Action The delegate to execute.
delay float The delay before the action is executed.
Résultat void

Transition() public static méthode

Calls the specified delegate every frame for the specified number of seconds.
public static Transition ( Action step, float duration ) : void
step Action The method to call each frame. This method takes on float parameter which is the progress from 0 to 1.
duration float The number of seconds to call the delegate for.
Résultat void

Transition() public static méthode

Calls the specified delegate every frame for the specified number of seconds, and then calls the specified callback delegate.
public static Transition ( Action step, float duration, System.Action completionCallback ) : void
step Action The method to call each frame. This method takes on float parameter which is the progress from 0 to 1.
duration float The number of seconds to call the delegate for.
completionCallback System.Action The method to call on completion of the transition.
Résultat void

Update() public static méthode

Updates all transitions. This is called by MyreGame.Update(gameTime).
public static Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void