/// <summary> /// 移除状态特效 /// </summary> public void RemoveStatusEffect() { if (m_StatusInfo == null) { return; } m_StatusInfo.State = StatusState.Remove; EventCenter.DoEvent(NDEventType.StatusCG, m_SceneID, m_StatusInfo); }
public void TriggerStatus() { if (m_StatusInfo == null) { return; } m_StatusInfo.State = StatusState.Add; EventCenter.DoEvent(NDEventType.StatusCG, m_SceneID, m_StatusInfo); }
/// <summary> /// 设置效果通知事件 /// </summary> protected void SetStatusEvent(int SkillType) { if (m_StatusInfo == null) { return; } m_StatusInfo.State = StatusState.Add; m_StatusInfo.SkillType = SkillType; EventCenter.DoEvent(NDEventType.StatusCG, m_SceneID, m_StatusInfo); }
/// <summary> /// 设置HP /// </summary> protected override void SetHp(int Hp) { base.SetHp(Hp); EventCenter.DoEvent(NDEventType.Attr_HP, m_SceneID, Hp * 1.0f / GetFullHp()); if (m_Hp <= 0) { Anger = 0; } }
public void UpdataPath() { if (!m_UpdataPathFlag) { return; } if (!m_DoUpatePath) { return; } #if UNITY_EDITOR_LOG if (m_AIEventData != null) { FileLog.write(m_SceneID, "UpdataPath1" + m_AIEventData.Event + "," + m_UpdataPathFlag); } #endif m_DoUpatePath = false; m_UpdataPathFlag = false; if (Path.CheckRunFinishRoad()) { m_FindAttackpos = false; EventCenter.DoEvent(NDEventType.StatusInterrupt, m_SceneID, LifeAction.WalkToEnd); } if (Path.CheckHavePath() == false) { RoleParent.RoleWalk.SeachTarget(); if (Path.CheckHavePath() == false) { m_FindAttackpos = false; CheackIdlePath(); } } else { if (RoleParent.RoleWalk.DoPathCheck(m_AIEventData)) { #if UNITY_EDITOR_LOG FileLog.write(m_SceneID, "DOUpdataPath2" + m_AIEventData.Event + "," + m_UpdataPathFlag); #endif m_AIEventData = null; ClearPath(); RoleParent.RoleWalk.SeachTarget(); } else { //m_UpdataPathFlag = true; //ClearPath(); CheackIdlePath(); } } }
/// <summary> /// 设置怒气 /// </summary> protected override void SetAnger(int anger) { if (anger >= FullAnger) { m_Anger = FullAnger; IsAngerSkill = 1; } else { if (m_Anger > 0 && anger <= 0) { EventCenter.DoEvent(NDEventType.StatusInterrupt, m_SceneID, LifeAction.AngerEmety); } m_Anger = anger; IsAngerSkill = 0; } if (m_Anger <= 0) { m_Anger = 0; } AttrChange = true; EventCenter.DoEvent(NDEventType.Attr_Anger, m_SceneID, m_Anger); }