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 Highlight(SkillSlotType inSlotType, bool bHighlight, bool bAll, bool bDoActivating, bool bPauseGame, bool bRecordUseTime = false, int id = 0) { if (bHighlight) { this.ClearHighlight(); } List <GameObject> list = this.QuerySkillButtons(inSlotType, bAll); bool flag = list.get_Count() == 1; if (flag && bDoActivating) { if (bHighlight) { this.Activate(SkillSlotType.SLOT_SKILL_COUNT, false, true); this.Activate(inSlotType, true, false); } else { this.Activate(SkillSlotType.SLOT_SKILL_COUNT, true, true); } } for (int i = 0; i < list.get_Count(); i++) { GameObject gameObject = list.get_Item(i); if (gameObject != null) { Singleton <CBattleSystem> .GetInstance().FightForm.SetButtonHighLight(gameObject, bHighlight); } } if (inSlotType < SkillSlotType.SLOT_SKILL_COUNT) { this.m_buttonHighLighted[(int)inSlotType] = bHighlight; if (bHighlight) { this.m_buttonUseTimeRecord[(int)inSlotType].Id = id; this.m_buttonUseTimeRecord[(int)inSlotType].useTime = CRoleInfo.GetCurrentUTCTime(); } else { RecordTime recordTime = this.m_buttonUseTimeRecord[(int)inSlotType]; Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().ReqSetInBattleNewbieBit((uint)recordTime.Id, false, CRoleInfo.GetCurrentUTCTime() - recordTime.useTime); recordTime.Id = 0; recordTime.useTime = 0; } } this.UpdateGamePausing(bPauseGame); }
public void HighlightLearnBtn(SkillSlotType inSlotType, bool bHighlight, bool bAll, bool bDoActivating, bool bPauseGame, bool bRecordUseTime = false, int id = 0) { if (!bAll && (inSlotType < SkillSlotType.SLOT_SKILL_1 || inSlotType > SkillSlotType.SLOT_SKILL_3)) { return; } List <GameObject> list = this.QuerySkillButtons(inSlotType, bAll); if (list.get_Count() == 0) { return; } bool flag = false; if (list.get_Count() == 1) { flag = true; } if (flag && bDoActivating) { if (bHighlight) { this.Activate(SkillSlotType.SLOT_SKILL_COUNT, false, true); this.ActivateLearnBtn(SkillSlotType.SLOT_SKILL_COUNT, false, true); this.ActivateLearnBtn(inSlotType, true, false); } else { this.Activate(SkillSlotType.SLOT_SKILL_COUNT, true, true); this.ActivateLearnBtn(SkillSlotType.SLOT_SKILL_COUNT, true, true); } } for (int i = 0; i < list.get_Count(); i++) { if (list.get_Item(i) != null) { Transform transform = list.get_Item(i).transform.FindChild("LearnBtn"); if (transform != null) { Singleton <CBattleSystem> .GetInstance().FightForm.SetLearnBtnHighLight(transform.gameObject, bHighlight); } } } if (inSlotType < SkillSlotType.SLOT_SKILL_COUNT) { this.m_learnBtnHighLighted[(int)inSlotType] = bHighlight; if (bHighlight) { this.m_learnBtnUseTimeRecord[(int)inSlotType].Id = id; this.m_learnBtnUseTimeRecord[(int)inSlotType].useTime = CRoleInfo.GetCurrentUTCTime(); } else { RecordTime recordTime = this.m_learnBtnUseTimeRecord[(int)inSlotType]; Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().ReqSetInBattleNewbieBit((uint)recordTime.Id, false, CRoleInfo.GetCurrentUTCTime() - recordTime.useTime); recordTime.Id = 0; recordTime.useTime = 0; } } this.UpdateGamePausing(bPauseGame); }