public void SetGuideBtnEnable(bool flag, GuideBtnParam btn) { if (!btn.GuideBtn) { TraceUtil.Log(SystemModel.Common, TraceLevel.Error, btn.UIType + " " + btn.SubUIType + " "); return; } var skillComponent = btn.GuideBtn.GetComponent <UI.Battle.BattleSkillButton>(); if (skillComponent != null) { skillComponent.SetStepDisable(flag); if (flag) { switch (skillComponent.SpecialType) { case UI.Battle.SpecialSkillType.Roll: //翻滚 { flag = PlayerGasSlotManager.Instance.GetAirSlotValue < skillComponent.skillEnergyComsume ? false : true; } break; case UI.Battle.SpecialSkillType.Explode: //爆气 { flag = PlayerGasSlotManager.Instance.GetAirSlotValue < skillComponent.skillEnergyComsume ? false : true; } break; case UI.Battle.SpecialSkillType.Meaning: //奥义 { flag = PlayerGasSlotManager.Instance.GetAirSlotValue < skillComponent.skillEnergyComsume ? false : true; if (EctypeManager.Instance.GetSirenSkillSurplusValue() <= 0) { flag = false; } } break; default: break; } } skillComponent.SetButtonStatus(flag); } else { var healthComponent = btn.GuideBtn.GetComponent <UI.Battle.HealthAndMagicButton>(); if (healthComponent != null) { healthComponent.SetMyButtonActive(flag); } } }
/// <summary> /// 设置引导按钮状态 /// </summary> /// <param name="btnParam"></param> /// <param name="flag">按钮可用</param> /// <param name="triggerEvent"></param> private void SetGuideBtnStatus(GuideBtnParam btnParam, bool flag, bool triggerEvent) { btnParam.BtnCollider.enabled = flag; }