void ChangeButtonStatus(SkillButtonStatus m_skillButtonStatus) { switch (m_skillButtonStatus) { case SkillButtonStatus.Enable: SetButtonEnabel(); break; case SkillButtonStatus.Disable: SetButtonDisabel(); break; case SkillButtonStatus.MPEnough: SetButtonMPEnoughStatus(); break; case SkillButtonStatus.MPNotEnough: SetButtonMPNotEnoughStatus(); break; case SkillButtonStatus.Recovering: SetButtonRecovering(); break; case SkillButtonStatus.Wait: SetButtonWait(); break; } }
/// <summary> /// 此处直接设置按钮状态 /// </summary> /// <param name="skillButtonStatus"></param> public void SetButtonStatus(SkillButtonStatus skillButtonStatus) { //TraceUtil.Log("尝试设置按钮状态:" +LanguageTextManager.GetString( this.skillConfigData.m_name)+ skillButtonStatus); //if (!CanChangeButton) { return; } //Debug.LogWarning(LanguageTextManager.GetString(skillConfigData.m_name) + ":设置按钮状态:" + skillButtonStatus+",CurrentStatus:"+this.skillButtonStatus); switch (skillButtonStatus) { case SkillButtonStatus.Enable: if (this.skillButtonStatus == SkillButtonStatus.Recovering || this.skillButtonStatus == SkillButtonStatus.MPNotEnough) { return; } if (RecoverFloatObj != null) { Destroy(this.RecoverFloatObj); RecoveSprite.fillAmount = BarCutDownMode == Battle.BarCutDownMode.MaxToMin? 0:1; } if (m_CDTimeTweenObj != null) { Destroy(m_CDTimeTweenObj); } SetMyButtonActive(true); SetSecondIcon(null); break; case SkillButtonStatus.Wait: SetSecondIcon(IconPrefabManager.Instance.getIcon("JH_UI_Icon_001")); break; case SkillButtonStatus.Recovering: SetMyButtonActive(false); SetSecondIcon(null); //if (this.skillButtonStatus == SkillButtonStatus.MPNotEnough) //{ HistroySkillButtonStatus = skillButtonStatus; //} break; case SkillButtonStatus.Disable: SetSecondIcon(null); SetMyButtonActive(false); break; case SkillButtonStatus.MPNotEnough: break; case SkillButtonStatus.Empty: break; default: break; } if (this.skillButtonStatus != SkillButtonStatus.MPNotEnough) { this.skillButtonStatus = skillButtonStatus; } }
public void SetButtonStatus(int SkillID, SkillButtonStatus skillButtonStatus) { //TraceUtil.Log("外部设置技能按钮状态:"+skillButtonStatus.ToString()); foreach (BattleSkillButton child in BattleButtons) { if (child != null && child.skillConfigData != null && child.skillConfigData.m_skillId == SkillID) { child.SetButtonStatus(skillButtonStatus); } } }
public void SetButtonStatus(SkillButtonStatus skillButtonStatus) { switch (skillButtonStatus) { case SkillButtonStatus.Recovering: if (RecoveSprite != null) { RecoveSprite.fillAmount = m_barCutDownMode == Battle.BarCutDownMode.MaxToMin ? 1 : 0; } break; default: break; } }
/// <summary> /// 此处直接设置按钮状态 /// </summary> /// <param name="skillButtonStatus"></param> public void SetButtonStatus(SkillButtonStatus m_skillButtonStatus) { switch (skillButtonStatus) { case SkillButtonStatus.MPNotEnough: if (skillButtonStatus == SkillButtonStatus.MPEnough) { SetButtonMPEnoughStatus(); } else { this.MpNotEnoughButtonStatus = m_skillButtonStatus; } break; default: ChangeButtonStatus(m_skillButtonStatus); break; } }
public void SetButtonMPStatus(bool Flag) { if (m_isDisable) { return; } if (CanChangeButton != Flag) { //Debug.LogWarning("改变技能图标状态:" + Flag + ",CurrentStatus:" + this.skillButtonStatus); //TraceUtil.Log(SystemModel.Common,TraceLevel.Error,"设置技能:" + LanguageTextManager.GetString(this.skillConfigData.m_name) + ":" + Flag.ToString()); this.CanChangeButton = Flag; if (Flag) { //SetButtonStatus(SkillButtonStatus.Enable); if (RecoverFloat != 0) { this.skillButtonStatus = this.HistroySkillButtonStatus; } else { this.skillButtonStatus = SkillButtonStatus.Enable; SetMyButtonActive(true); } this.MPNotEnoughICON.enabled = false; this.RecoveSprite.gameObject.SetActive(true); this.IconPoint2.gameObject.SetActive(true); } else { SetMyButtonActive(true); EffectsPoint.ClearChild(); HistroySkillButtonStatus = this.skillButtonStatus; this.skillButtonStatus = SkillButtonStatus.MPNotEnough; this.MPNotEnoughICON.enabled = true; this.RecoveSprite.gameObject.SetActive(false); this.IconPoint2.gameObject.SetActive(false); } } }
public void SetButtonStatus(bool Flag) { //m_isDisable = !Flag; if (CanChangeButton != Flag) { this.CanChangeButton = Flag; if (Flag) { ActiveStepButton(); //SetButtonStatus(SkillButtonStatus.Enable); if (RecoverFloat != 0) { this.skillButtonStatus = this.HistroySkillButtonStatus; } else { this.skillButtonStatus = SkillButtonStatus.Enable; SetMyButtonActive(true); } this.MPNotEnoughICON.enabled = false; this.RecoveSprite.gameObject.SetActive(true); this.IconPoint2.gameObject.SetActive(true); } else { SetMyButtonActive(false); if (EffectsObj != null) { Destroy(EffectsObj); } HistroySkillButtonStatus = this.skillButtonStatus; this.skillButtonStatus = SkillButtonStatus.MPNotEnough; this.MPNotEnoughICON.enabled = true; this.RecoveSprite.gameObject.SetActive(false); this.IconPoint2.gameObject.SetActive(false); } } }
public void SetSirenSkillButtonMPStatus(bool Flag) { if (m_isDisable) { return; } if (CanChangeButton != Flag) { this.CanChangeButton = true; if (Flag) { if (RecoverFloat != 0) { this.skillButtonStatus = this.HistroySkillButtonStatus; } else { this.skillButtonStatus = SkillButtonStatus.Enable; SetMyButtonActive(true); } this.MPNotEnoughICON.enabled = false; this.RecoveSprite.gameObject.SetActive(true); this.IconPoint2.gameObject.SetActive(true); } else { SetMyButtonActive(true); EffectsPoint.ClearChild(); HistroySkillButtonStatus = this.skillButtonStatus; this.skillButtonStatus = SkillButtonStatus.MPNotEnough; this.MPNotEnoughICON.enabled = true; this.RecoveSprite.gameObject.SetActive(true); this.IconPoint2.gameObject.SetActive(false); } } }