public void HighlishtRestSkillBtn(enRestSkillSlotType inRestSkillType, bool bHighlight, bool bDoActivating, bool bPause) { GameObject button = this.QueryRestSkillBtn(inRestSkillType); if (button != null) { if (bDoActivating) { if (bHighlight) { this.Activate(SkillSlotType.SLOT_SKILL_COUNT, false, true); this.ActivateOtherBtn(enRestSkillSlotType.BTN_SKILL_COUNT, false, true); this.ActivateOtherBtn(inRestSkillType, true, false); this.ActivateUI(false); } else { this.Activate(SkillSlotType.SLOT_SKILL_COUNT, true, true); this.ActivateOtherBtn(enRestSkillSlotType.BTN_SKILL_COUNT, true, true); this.ActivateUI(true); } } Singleton <CBattleSystem> .GetInstance().FightForm.SetButtonHighLight(button, bHighlight); if (inRestSkillType < enRestSkillSlotType.BTN_SKILL_COUNT) { this.m_restSkilBtnHighLighted[(int)inRestSkillType] = bHighlight; } this.UpdateGamePausing(bPause); } }
public GameObject QueryRestSkillBtn(enRestSkillSlotType inSlotType) { CUIFormScript cUIFormScript = (Singleton <CBattleSystem> .GetInstance().FightForm != null) ? Singleton <CBattleSystem> .GetInstance().FightForm.GetSkillBtnFormScript() : null; if (cUIFormScript == null) { return(null); } GameObject result = null; switch (inSlotType) { case enRestSkillSlotType.BTN_SKILL_SELHERO: result = cUIFormScript.GetWidget(24); break; case enRestSkillSlotType.BTN_SKILL_SELSOLDIER: result = cUIFormScript.GetWidget(9); break; case enRestSkillSlotType.BTN_SKILL_LASTHITBTN: result = cUIFormScript.GetWidget(25); break; } return(result); }
protected override void CopyData(BaseEvent src) { base.CopyData(src); SkillHudCtrlTick skillHudCtrlTick = src as SkillHudCtrlTick; this.bSkillSlot = skillHudCtrlTick.bSkillSlot; this.SlotType = skillHudCtrlTick.SlotType; this.bAllSkillSlots = skillHudCtrlTick.bAllSkillSlots; this.bHighlight = skillHudCtrlTick.bHighlight; this.bHighlightLearnBtn = skillHudCtrlTick.bHighlightLearnBtn; this.bActivate = skillHudCtrlTick.bActivate; this.bShow = skillHudCtrlTick.bShow; this.bShowLearnBtn = skillHudCtrlTick.bShowLearnBtn; this.bYes = skillHudCtrlTick.bYes; this.bPauseGame = skillHudCtrlTick.bPauseGame; this.bNoActivatingOthers = skillHudCtrlTick.bNoActivatingOthers; this.bJoystick = skillHudCtrlTick.bJoystick; this.bHighlightJoystick = skillHudCtrlTick.bHighlightJoystick; this.restSkillBtnType = skillHudCtrlTick.restSkillBtnType; this.bHideOtherBtn = skillHudCtrlTick.bHideOtherBtn; this.bHighlightOterBtn = skillHudCtrlTick.bHighlightOterBtn; this.bPlayerShowAnim = skillHudCtrlTick.bPlayerShowAnim; this.bRecordUseTime = skillHudCtrlTick.bRecordUseTime; this.recordTimeId = skillHudCtrlTick.recordTimeId; }
public void HighlishtRestSkillBtn(enRestSkillSlotType inRestSkillType, bool bHighlight, bool bDoActivating, bool bPause, bool bRecordUseTime = false, int id = 0) { if (bHighlight) { this.ClearHighlight(); } GameObject gameObject = this.QueryRestSkillBtn(inRestSkillType); if (gameObject != null) { if (bDoActivating) { if (bHighlight) { this.Activate(SkillSlotType.SLOT_SKILL_COUNT, false, true); this.ActivateOtherBtn(enRestSkillSlotType.BTN_SKILL_COUNT, false, true); this.ActivateOtherBtn(inRestSkillType, true, false); this.ActivateUI(false); } else { this.Activate(SkillSlotType.SLOT_SKILL_COUNT, true, true); this.ActivateOtherBtn(enRestSkillSlotType.BTN_SKILL_COUNT, true, true); this.ActivateUI(true); } } Singleton <CBattleSystem> .GetInstance().FightForm.SetButtonHighLight(gameObject, bHighlight); if (inRestSkillType < enRestSkillSlotType.BTN_SKILL_COUNT) { this.m_restSkilBtnHighLighted[(int)inRestSkillType] = bHighlight; if (bHighlight) { this.m_restSkilBtnUseTimeRecord[(int)inRestSkillType].Id = id; this.m_restSkilBtnUseTimeRecord[(int)inRestSkillType].useTime = CRoleInfo.GetCurrentUTCTime(); } else { RecordTime recordTime = this.m_restSkilBtnUseTimeRecord[(int)inRestSkillType]; Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().ReqSetInBattleNewbieBit((uint)recordTime.Id, false, CRoleInfo.GetCurrentUTCTime() - recordTime.useTime); recordTime.Id = 0; recordTime.useTime = 0; } } this.UpdateGamePausing(bPause); } }
public void ActivateOtherBtn(enRestSkillSlotType inSlotType, bool bActivate, bool bAll) { NewbieGuideManager.CloseGuideForm(); if (!bAll && (inSlotType < enRestSkillSlotType.BTN_SKILL_SELHERO || inSlotType > enRestSkillSlotType.BTN_SKILL_COUNT)) { return; } if (bAll) { for (int i = 0; i < 3; i++) { GameObject gameObject = this.QueryRestSkillBtn((enRestSkillSlotType)i); if (gameObject != null) { Button component = gameObject.GetComponent <Button>(); if (component) { component.enabled = bActivate; } CUIEventScript component2 = gameObject.GetComponent <CUIEventScript>(); if (component2) { component2.enabled = bActivate; } } } } else { GameObject gameObject2 = this.QueryRestSkillBtn(inSlotType); if (gameObject2 != null) { Button component3 = gameObject2.GetComponent <Button>(); if (component3) { component3.enabled = bActivate; } CUIEventScript component4 = gameObject2.GetComponent <CUIEventScript>(); if (component4) { component4.enabled = bActivate; } } } }
public void ActivateOtherBtn(enRestSkillSlotType inSlotType, bool bActivate, bool bAll) { if (bAll || ((inSlotType >= enRestSkillSlotType.BTN_SKILL_SELHERO) && (inSlotType <= enRestSkillSlotType.BTN_SKILL_COUNT))) { if (bAll) { GameObject obj2 = null; for (int i = 0; i < 2; i++) { obj2 = this.QueryRestSkillBtn((enRestSkillSlotType)i); if (obj2 != null) { Button component = obj2.GetComponent <Button>(); if (component != null) { component.enabled = bActivate; } CUIEventScript script = obj2.GetComponent <CUIEventScript>(); if (script != null) { script.enabled = bActivate; } } } } else { GameObject obj3 = this.QueryRestSkillBtn(inSlotType); if (obj3 != null) { Button button2 = obj3.GetComponent <Button>(); if (button2 != null) { button2.enabled = bActivate; } CUIEventScript script2 = obj3.GetComponent <CUIEventScript>(); if (script2 != null) { script2.enabled = bActivate; } } } } }
public void ShowRestkSkillBtn(enRestSkillSlotType inRestSkillType, bool bShow) { GameObject gameObject = this.QueryRestSkillBtn(inRestSkillType); if (gameObject != null) { if (bShow) { if (this.m_RestSkillBtnHidden[(int)inRestSkillType]) { gameObject.CustomSetActive(true); this.m_RestSkillBtnHidden[(int)inRestSkillType] = false; } } else { gameObject.CustomSetActive(false); this.m_RestSkillBtnHidden[(int)inRestSkillType] = true; } } }
protected override void CopyData(BaseEvent src) { base.CopyData(src); SkillHudCtrlTick tick = src as SkillHudCtrlTick; this.bSkillSlot = tick.bSkillSlot; this.SlotType = tick.SlotType; this.bAllSkillSlots = tick.bAllSkillSlots; this.bHighlight = tick.bHighlight; this.bHighlightLearnBtn = tick.bHighlightLearnBtn; this.bActivate = tick.bActivate; this.bShow = tick.bShow; this.bShowLearnBtn = tick.bShowLearnBtn; this.bYes = tick.bYes; this.bPauseGame = tick.bPauseGame; this.bNoActivatingOthers = tick.bNoActivatingOthers; this.bJoystick = tick.bJoystick; this.bHighlightJoystick = tick.bHighlightJoystick; this.restSkillBtnType = tick.restSkillBtnType; this.bHideOtherBtn = tick.bHideOtherBtn; this.bHighlightOterBtn = tick.bHighlightOterBtn; }
public GameObject QueryRestSkillBtn(enRestSkillSlotType inSlotType) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(FightForm.s_battleUIForm); if (form == null) { return(null); } GameObject obj2 = null; enRestSkillSlotType type = inSlotType; if (type != enRestSkillSlotType.BTN_SKILL_SELHERO) { if (type != enRestSkillSlotType.BTN_SKILL_SELSOLDIER) { return(obj2); } } else { return(form.GetWidget(0x44)); } return(form.GetWidget(0x39)); }