|
- using System;
- using SUISSEngine;
-
- public class TooMuchParallelBuildsPopupState : PopupBaseState
- {
- public override void ClosePopup(Action callback, bool animate, bool synchronous)
- {
- if (this._cancelAction != null)
- {
- this._cancelAction();
- this._cancelAction = null;
- }
- this._succesAction = null;
- base.ClosePopup(callback, animate, synchronous);
- }
-
- public void UpdateInfo(Action succesAction, Action cancelAction, Currencies extraCost)
- {
- this._succesAction = succesAction;
- this._cancelAction = cancelAction;
- ((TooMuchParallelBuildsPopupView)this.View).UpdateInfo(extraCost);
- }
-
- public void Buy()
- {
- if (this._succesAction != null)
- {
- this._succesAction();
- this._succesAction = null;
- this._cancelAction = null;
- }
- base.ClosePopup();
- }
-
- private Action _succesAction;
-
- private Action _cancelAction;
- }
|