コード例 #1
0
 /// <summary>
 /// 移除状态特效
 /// </summary>
 public void RemoveStatusEffect()
 {
     if (m_StatusInfo == null)
     {
         return;
     }
     m_StatusInfo.State = StatusState.Remove;
     EventCenter.DoEvent(NDEventType.StatusCG, m_SceneID, m_StatusInfo);
 }
コード例 #2
0
 public void TriggerStatus()
 {
     if (m_StatusInfo == null)
     {
         return;
     }
     m_StatusInfo.State = StatusState.Add;
     EventCenter.DoEvent(NDEventType.StatusCG, m_SceneID, m_StatusInfo);
 }
コード例 #3
0
 /// <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);
 }
コード例 #4
0
ファイル: RoleAttribute.cs プロジェクト: 741645596/batgame
    /// <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;
        }
    }
コード例 #5
0
ファイル: SummonPetGridRun.cs プロジェクト: 741645596/batgame
    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();
            }
        }
    }
コード例 #6
0
ファイル: RoleAttribute.cs プロジェクト: 741645596/batgame
 /// <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);
 }