public void Update(float elapsed) { if (_shown || _completed) { return; } if (_alertPrototype == null) { _alertPrototype = Services.Instance.Resolve <IAlertView>(); if (_alertPrototype == null) { throw new InvalidOperationException("Could not find alert view"); } } var alertView = (IAlertView)_alertPrototype.Clone(); alertView.Title = "Tutorial Step"; alertView.Message = AlertMessage; alertView.Input = false; alertView.Buttons = new[] { "Ok" }; alertView.Show(result => { _completed = true; }); _shown = true; }
void Start() { _alertPrototype = Services.Instance.Resolve <IAlertView>(); if (_alertPrototype == null) { throw new InvalidOperationException("Could not find alert view"); } _tutorialManager = Services.Instance.Resolve <ITutorialManager>(); if (_tutorialManager == null) { throw new InvalidOperationException("Could not find tutorial manager for tutorials selector"); } ShowTutorialsUI(); }
public void ShowAlert(IAlertView obj) { SaveData(); obj.ShowAlert(); }
public AlertPresenter(IAlertView view) { this.view = view; }