示例#1
0
        public override bool Execute(object sender, SkillInstance instance, long delta, long curSectionTime)
        {
            if (curSectionTime < m_StartTime)
            {
                return(true);
            }
            if (curSectionTime >= m_StartTime + m_RemainTime)
            {
                SupplementCount(instance);
                return(false);
            }
            GameObject obj = sender as GameObject;

            if (obj == null)
            {
                return(false);
            }
            if (!TriggerUtil.IsTouching(obj))
            {
                return(true);
            }
            if (curSectionTime >= m_NextTriggerTime)
            {
                m_NextTriggerTime = curSectionTime + m_TriggerInterval;
                m_CurCount++;
                StoreTouchPos(obj, instance);
                instance.SendMessage(m_Message);
                if (m_CurCount >= m_MaxCount)
                {
                    return(false);
                }
            }
            return(true);
        }