Exemple #1
0
    static public void GetWetTarget(ref List <Life> targetlist, SkillInfo skill, Life own)
    {
        float       radius = ConfigM.GetWetBodyRange() * 0.01f;
        List <Life> lr     = new List <Life>();
        LifeMCamp   camp   = GetSkillCamp(skill, own);

        CM.SearchLifeMListInBoat(ref lr, LifeMType.SOLDIER, camp);
        for (int i = 0; i < targetlist.Count; i++)
        {
            Life l = targetlist[i];
            foreach (Role r in lr)
            {
                if (NdUtil.IsSameMapLayer(l.MapPos, r.MapPos))
                {
                    if (r.m_thisT.localPosition.x >= (l.m_thisT.localPosition.x - radius) && r.m_thisT.localPosition.x <= (l.m_thisT.localPosition.x + radius))
                    {
                        if (r.m_Attr.IsWetBody)
                        {
                            if (!targetlist.Contains(r))
                            {
                                targetlist.Add(r);
                            }
                        }
                    }
                }
            }
        }
    }