Пример #1
0
    public virtual bool TriggerConditionHandler()
    {
        if (m_Attr.Broken)
        {
            return(false);
        }
        if (m_Skill.PropSkillInfo == null)
        {
            return(false);
        }
        BuildSkill skillBuild = m_Skill as BuildSkill;

        if (!skillBuild.CheckSkillTrigger(this))
        {
            return(false);
        }
        m_bTriggerSkill    = true;
        m_fTriggerTime     = Time.time;
        m_nAttackIndex     = 0;
        m_fAttackTickReady = 0;
        ActiveHidecdTimer();
        List <Life> RoleList = skillBuild.GetBuildSkillTarget(this);

        if (RoleList.Count > 0)
        {
            TriggerSkillTime(ref RoleList, ref m_fReleaseDelay);
        }
        return(true);
    }
Пример #2
0
 public virtual void BuildUpdate()
 {
     if (m_bTriggerSkill && Time.time - m_fTriggerTime > m_fReleaseDelay)
     {
         BuildSkill  skillBuild = m_Skill as BuildSkill;
         List <Life> RoleList   = skillBuild.GetBuildSkillTarget(this);
         if (RoleList.Count > 0)
         {
             bool bRet = false;
             m_fAttackTickReady += Time.deltaTime;
             if ((m_fAttackTickReady - Time.deltaTime) <= 0)
             {
                 QianYaoSkill(ref RoleList, ref m_nAttackIndex);
             }
             if (m_fAttackTickReady > m_eventtime)
             {
                 if (m_nAttackIndex < m_nAttackCount && m_fAttackTickReady > m_Attacktimes[m_nAttackIndex])
                 {
                     if ((m_Skill.PropSkillInfo.m_AttributeType & AttributeType.Electric) == AttributeType.Electric)
                     {
                         Skill.GetWetTarget(ref RoleList, m_Skill.PropSkillInfo, this);
                     }
                     bRet = ReleaseSkill(ref RoleList, ref m_nAttackIndex);
                 }
                 if (bRet)
                 {
                     m_nAttackIndex++;
                     if (m_nAttackIndex >= m_nAttackCount)
                     {
                         m_bTriggerSkill = false;
                     }
                     if (m_nAttackIndex == 1 && m_Attr.Durability > 0)
                     {
                         m_Attr.Durability = m_Attr.Durability - 1;
                         if (m_Attr.Durability <= 0)
                         {
                             Dead();
                         }
                     }
                 }
             }
         }
     }
 }