void ChangeShowState(MyKeys.CurrentHero nowHero) { Image[] current_List = null; switch (nowHero) { case MyKeys.CurrentHero.CiShen: current_List = _ciShen_Images; break; case MyKeys.CurrentHero.YuZi: current_List = _yuZI_Images; break; case MyKeys.CurrentHero.ShouSi: current_List = _shouSi_Images; break; } if (MyKeys.JudgeWhetherBuy(nowHero)) { WhiteImages(current_List); } else { GrayImages(current_List); } }
void UpdateText(int mark) { if (!MyKeys.JudgeWhetherBuy((MyKeys.CurrentHero)mark)) { return; } UpdateLevelText(); UpdateExplainText(); }
//选中事件 public void Choose(int mark) { if ((int)_the_Clicked_Hero == mark) { return; } //播放音效 switch ((MyKeys.CurrentHero)mark) { case MyKeys.CurrentHero.GuiYuZi: MyAudio.PlayAudio(StaticParameter.s_GuiYuZi_Select, false, StaticParameter.s_GuiYuZi_Select_Volume); break; case MyKeys.CurrentHero.CiShen: MyAudio.PlayAudio(StaticParameter.s_CiShen_Select, false, StaticParameter.s_CiShen_Select_Volume); break; case MyKeys.CurrentHero.YuZi: MyAudio.PlayAudio(StaticParameter.s_YuZi_Select, false, StaticParameter.s_YuZi_Select_Volume); break; } MyAudio.PlayAudio(StaticParameter.s_UI_OK, false, StaticParameter.s_UI_OK_Volume); MyKeys.CurrentHero click = (MyKeys.CurrentHero)mark; _the_Clicked_Hero = click; if (MyKeys.JudgeWhetherBuy(click)) { MyKeys.CurrentSelectedHero = click; UpdateList(click); } ChangeSelectedState(mark); //更新红点状态 UpdatePage(); JudgeMaxButtonState(); }