Ejemplo n.º 1
0
    public override void CalculateNextTargets(ref List <SkillTarget> targetList)
    {
        targetList.Clear();

        // 根据当前瞄准方向更新主区域的目标信息
        m_MainAimArea.UpdateBaseRay(GetViewRay().direction);
        m_MainAimArea.UpdateRayList(true);
        m_MainAimArea.GetRayList(ref m_AimDirectionsCache);
        for (int iRay = 0; iRay < m_AimDirectionsCache.Count; iRay++)
        {
            targetList.Add(CalulateTargetDataByShootingDirection(m_AimDirectionsCache[iRay]));
        }

        // 根据当前瞄准方向更新主区域的目标信息
        for (int iAim = 0; iAim < m_SubAimAreas.Count; iAim++)
        {
            m_SubAimAreas[iAim].UpdateBaseRay(GetViewRay().direction);
            m_SubAimAreas[iAim].UpdateRayList(true);
            m_SubAimAreas[iAim].GetRayList(ref m_AimDirectionsCache);
            for (int iRay = 0; iRay < m_AimDirectionsCache.Count; iRay++)
            {
                targetList.Add(CalulateTargetDataByShootingDirection(m_AimDirectionsCache[iRay]));
            }
        }
    }