C# Класс Myre.Delayed

A static class containing methods for fire-and-forget delayed events and transitions.
Показать файл Открыть проект

Открытые методы

Метод Описание
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).

Описание методов

Action() публичный статический Метод

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.
Результат void

Transition() публичный статический Метод

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.
Результат void

Transition() публичный статический Метод

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.
Результат void

Update() публичный статический Метод

Updates all transitions. This is called by MyreGame.Update(gameTime).
public static Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void