private void DialogConfirmBtnClicked(DialogHitType type) { switch (type) { case DialogHitType.FindArchive: SceneManager.LoadSceneAsync("Loading"); break; } }
public override void DialogConfirmBtnClicked(DialogHitType type) { switch (type) { case DialogHitType.Exit: SaveMapMessage(); SceneManager.LoadSceneAsync("SelectLevel"); break; } }
private void DialogCancelBtnClicked(DialogHitType type) { switch (type) { case DialogHitType.FindArchive: CurrentLevelMessage.Instance.Reset(); SceneManager.LoadSceneAsync("Loading"); break; } }
public void ShowDialog(string title, string content, DialogHitType hitType) { if (dialogTwoBtn == null) { dialogTwoBtn = this.transform.parent.Find("DialogTwoBtn").gameObject.GetComponent <DialogTwoBtnController>() as DialogTwoBtnController; } dialogTwoBtn.InitContent(title, content, hitType); dialogTwoBtn.confirmBtnClicked = DialogConfirmBtnClicked; dialogTwoBtn.cancelBtnClicked = DialogCancelBtnClicked; dialogTwoBtn.SetActive(true); }
public static void ShowOneBtnDialog(Transform trans, string title, string content, DialogHitType type, DialogController.ConfirmBtnClicked confirmCallback = null) { if (DialogOneAB == null) { DialogOneAB = AssetBundleConfig.LoadAssetBundle(DialogOneABPath, neededABDic); if (DialogOneAB == null) { Debug.Log("ShowOneBtnDialog fail, DialogAB is null"); return; } } Object dialog = DialogOneAB.LoadAllAssets() [0]; if (dialog != null) { GameObject obj = Instantiate(dialog) as GameObject; obj.transform.SetParent(trans, false); DialogController dialogTwo = obj.GetComponent <DialogController> (); dialogTwo.InitContent(title, content, type); dialogTwo.confirmBtnClicked = confirmCallback; } }
public virtual void DialogCancelBtnClicked(DialogHitType type) { }
public virtual void DialogConfirmBtnClicked(DialogHitType type) { }
void test(DialogHitType type) { Debug.Log("test--" + type); }
public void InitContent(string title, string content, DialogHitType hitType) { this.title = title; this.content = content; this.hitType = hitType; }
public override void DialogCancelBtnClicked(DialogHitType type) { }
public override void DialogConfirmBtnClicked(DialogHitType type) { }