/// <summary> /// Well, this one here is an example of what you should not code. /// It's handling logic and UI tasks in the same class. /// What if suddenly we want to reuse this class in other project? /// Should we refactor it again to comply with the logic to show UI? /// Bad practice /// </summary> public void ShowVideoRewardFailedDialog() { SceneManager.Instance.SetLoadingVisible(false); MessageBoxDataModel msg = new MessageBoxDataModel(); //msg.message = "The game data on your device and our server do not look alike. Which data would you like to use?"; //msg.messageNo = "SERVER DATA"; //msg.messageYes = "CURRENT DATA"; msg.message = Localization.Get("pu_rewardloadfailed_title"); //msg.messageNo = Localization.Get("pu_rewardloadfailed_btn_ok"); msg.messageYes = Localization.Get("pu_rewardloadfailed_btn_ok"); ; //msg.OnNoButtonClicked = delegate { }; msg.OnYesButtonClicked = delegate { }; SceneManager.Instance.OpenPopup(ProjectConstants.Scenes.MessageBoxPopup, msg); }
public void CleanUp() { DataModel = new MessageBoxDataModel(); }