public void Click() { if (gameObject.name == ConstLib.BTNSHOP) { manager.Push(shopCanvas); } else if (gameObject.name == ConstLib.BTNBUYBOOM) { if (ConstLib.Integral >= buyBoomIntegral) { ConstLib.Integral -= buyBoomIntegral; ConstLib.WriteIntegral(); PlayerState.prop.BoomNum++; PlayerState.SetBoomNum(); //Text txt = Instantiate(Resources.Load<Text>(ConstLib.PREFAB_TIG), shopCanvas.transform); //txt.text = Convert.ToString("购买成功"); ToolLib.Tig(shopCanvas.transform, "购买成功"); } } else if (gameObject.name == ConstLib.BTNBUYTIMEADD) { if (ConstLib.Integral >= buyTimeAddIntegral) { ConstLib.Integral -= buyTimeAddIntegral; ConstLib.WriteIntegral(); PlayerState.prop.TimeAddNum++; PlayerState.SetTimeAddNum(); //Text txt = Instantiate(Resources.Load<Text>(ConstLib.PREFAB_TIG), shopCanvas.transform); //txt.text = Convert.ToString("购买成功"); ToolLib.Tig(shopCanvas.transform, "购买成功"); } } }
void NextLevel() { Clear(); InitCanvas(); InitNewYearPic(); ToolLib.Tig(eliminateToLeCanvas.transform, ConstLib.EliminateToLeIntegral.ToString()); ConstLib.Integral += ConstLib.EliminateToLeIntegral; ConstLib.WriteIntegral(); }
void NextLevel() { currentQuestions = 0; countDownBar.value = countDownBar.maxValue; topicIndex = 0; requstProportion += 0.05f; GetTopics(); SetTopics(topicNO[0]); ToolLib.Tig(kownHowMuchCanvas.transform, ConstLib.KownHowMuchIntegral.ToString()); ConstLib.Integral += ConstLib.KownHowMuchIntegral; ConstLib.WriteIntegral(); }
void NextLevel() { ConstLib.Integral += ConstLib.FishingToLeIntegral; ConstLib.WriteIntegral(); InitShowPic(); countDownBar.value += ConstLib.FishingToLeTimeAddInterval; showedNum = 0; foreach (Transform mask in pic.transform) { Image img = mask.gameObject.GetComponent <Image>(); if (img.color.a == 0) { img.color = picColor; } } }