/// <summary> /// 初始化战斗 /// </summary> public void InitFight(int cloneId) { if (cloneId < 1) { return; } mCloneId = cloneId; CloneSceneProperty cs = XmlManager.Instance.GetCloneSceneProperty(mCloneId); if (cs == null) { return; } // 预加载资源 PreLoadObject(cs); // 初始化怪物信息 InitMonster(cs.mCloneSceneMonsterInfoList); // 初始化战斗UI InitFightUI(); // 战斗开始倒计时 TimerManager.AddTimerCount("FightCountDown", mFightPrepareTime, FightCountDown); }
/// <summary> /// 设置技能CD /// </summary> /// <param name="skillId"></param> /// <param name="cdTime"></param> public void SetSkillCD(int skillId, float cdTime) { if (!mSkillIndexDic.ContainsKey(skillId)) { return; } TimerManager.AddTimerCount(skillId.ToString(), cdTime, SkillCountDown, skillId, cdTime); }