Ejemplo n.º 1
0
    /// <summary>
    /// 获取下一个轮询技能ID
    /// </summary>
    /// <returns></returns>
    private int GetNextSkillOrderID()
    {
        int N = m_AttackTimes++;

        if (string.IsNullOrEmpty(m_attack1) || string.IsNullOrEmpty(m_attack2) || N <= 0)
        {
            Debug.LogError("数据非法 " + N);
            return(-1);
        }
        else
        {
            int M = m_attack1.Length;
            int P = m_attack2.Length;
            if (N <= M)
            {
                return(NdUtil.GetNumIndex(m_attack1, N));
            }
            else
            {
                int Q = (N - M) % P;
                if (Q == 0)
                {
                    Q = P;
                }
                return(NdUtil.GetNumIndex(m_attack2, Q));
            }
        }
    }