Project290.Menus.MenuAction.TryRunDelegate C# (CSharp) Méthode

TryRunDelegate() public méthode

Tries to run the delegate. This should be called every cycle, as this will check the controller to see if the corresponding action has been performed. If so, and if the delegate is not null, then the delegated action is performed.
public TryRunDelegate ( ) : void
Résultat void
        public void TryRunDelegate()
        {
            if (this.menuDelegate != null)
            {
                if (GameWorld.controller.ContainsBool(this.actionType))
                {
                    GameWorld.audio.PlaySound("menuClick");
                    this.menuDelegate.Run();
                }
            }
        }