public void EndAnimationComrfirm() { //CommonObjectScript.isViewPoppup = false; if (iDButtonComfirmApply == 1) { this.gameObject.SetActive(false); if (idButton == 2) { commonObject.GetComponent <CommonObjectScript>().ResultButtonVisible(); commonObject.GetComponent <CommonObjectScript>().typeReasearch = 1; //Application.LoadLevel("VilageResearch"); LoadingScene.ShowLoadingScene("VilageResearch", true); VilageResearchController.ResetVilage(); } else if (idButton == 3) { maketPopup.gameObject.SetActive(true); } else { CreatTownScenesController.isDenyContinue = false; } } else if (iDButtonComfirmApply == 2) { // this.gameObject.SetActive(false); } isApply = false; }
public void OKComfirm_ClickComfirm() { audioControl.PlaySound("Click 1"); iDButtonComfirmApply = 1; panelCofirmApply.GetComponent <Animator>().Play("InVisible"); if (!isApply) { if (idButton == 0 || idButton == 1) { if (CommonObjectScript.dollar >= TownScenesController.ListMaketResearchItem[idButtonItem].costCoin && VariableSystem.diamond >= TownScenesController.ListMaketResearchItem[idButtonItem].costDiamond) { TownScenesController.townsBusy[3] = true; if (idButtonItem > 4) { CreateTimer(TownScenesController.ListMaketResearchItem[idButtonItem].time); DialogAchievement.AddDataAchievement(13, 1); } else { CreateTimer(0); DialogAchievement.AddDataAchievement(14, 1); } AddCommonObject(-TownScenesController.ListMaketResearchItem[idButtonItem].costCoin, -TownScenesController.ListMaketResearchItem[idButtonItem].costDiamond); VilageResearchController.ResetVilage(); } else { // print(TownScenesController.ListMaketResearchItem[idButtonItem].costCoin + "aaaaaaaaaaaaaa"); if (TownScenesController.ListMaketResearchItem[idButtonItem].costCoin != 0) { GameObject.Find("CommonObject").GetComponent <CommonObjectScript>().ChangeDolar(TownScenesController.ListMaketResearchItem[idButtonItem].costCoin - CommonObjectScript.dollar); } else { DialogInapp.ShowInapp(); } } } isApply = true; } }
void EndEvenAnimation() { CommonObjectScript.isViewPoppup = false; if (!isCloseClick) { if (commonObject.transform.FindChild("Btn_Result").gameObject.activeInHierarchy) { panelCofirmApply.gameObject.SetActive(true); panelCofirmApply.GetComponent <Animator>().Play("Visible"); } else { // print("tiennnnnnnnnnnnnnnnnnnn " + TownScenesController.ListMaketResearchItem[idButtonItem].costCoin); //if (!isApply) { if (idButton == 2) { commonObject.GetComponent <CommonObjectScript>().ResultButtonVisible(); commonObject.GetComponent <CommonObjectScript>().typeReasearch = 1; //Application.LoadLevel("VilageResearch"); VilageResearchController.ResetVilage(); LoadingScene.ShowLoadingScene("VilageResearch", true); DialogAchievement.AddDataAchievement(12, 1); } else if (idButton == 3) { maketPopup.gameObject.SetActive(true); } else { if (CommonObjectScript.dollar >= TownScenesController.ListMaketResearchItem[idButtonItem].costCoin && VariableSystem.diamond >= TownScenesController.ListMaketResearchItem[idButtonItem].costDiamond) { TownScenesController.townsBusy[3] = true; if (idButtonItem > 4) { CreateTimer(TownScenesController.ListMaketResearchItem[idButtonItem].time); DialogAchievement.AddDataAchievement(13, 1); } else { CreateTimer(0); DialogAchievement.AddDataAchievement(14, 1); } AddCommonObject(-TownScenesController.ListMaketResearchItem[idButtonItem].costCoin, -TownScenesController.ListMaketResearchItem[idButtonItem].costDiamond); VilageResearchController.ResetVilage(); } else { if (TownScenesController.ListMaketResearchItem[idButtonItem].costCoin != 0) { GameObject.Find("CommonObject").GetComponent <CommonObjectScript>().ChangeDolar(TownScenesController.ListMaketResearchItem[idButtonItem].costCoin - CommonObjectScript.dollar); } else { DialogInapp.ShowInapp(); } } CreatTownScenesController.isDenyContinue = false; } //isApply = true; } this.gameObject.SetActive(false); } } else { this.gameObject.SetActive(false); CreatTownScenesController.isDenyContinue = false; } }