public void ShowAlert(string text, ModelAlert.AlertEvent fun = null, bool isYesAndNo = false, bool close = false) { ModelAlert model = ModelManager.inst.alertModel; model.text = text; model.onAlert = fun; model.isYesAndNo = isYesAndNo; model.close = close; model.showType = 0; CloseAlert(); alert = new ComAlert(); t.AddChild(alert.group); SetTMask(); EffectManager.inst.ShowView(alert.group); }
//需要消耗多少 public void ShowAlert(string id, int count, ModelAlert.AlertEvent fun = null) { ModelAlert model = ModelManager.inst.alertModel; model.text = ""; model.onAlert = fun; model.isYesAndNo = true; model.id = id; model.count = count; model.showType = 1; CloseAlert(); alert = new ComAlert(); t.AddChild(alert.group); SetTMask(); EffectManager.inst.ShowView(alert.group); }
public void ShowAlertLike(string id, int count, ModelAlert.AlertEvent fun = null) { ModelAlert model = ModelManager.inst.alertModel; model.onAlert = fun; model.id = id; model.count = count; CloseAlert(); if (model.isOpen) { alertLike = new ComAlertLike(); t.AddChild(alertLike.group); SetTMask(); EffectManager.inst.ShowView(alertLike.group); } else { model.execute(1); } }