Ejemplo n.º 1
0
    public void Init()
    {
        m_TempVec3 = new Vector3();
        m_CurUseHudCount = 0;

        m_DamageTextList = new List<DamageHudData>();
        foreach(Text text in gameObject.GetComponentsInChildren(typeof(Text)))
        {
            DamageHudData data = new DamageHudData();
            data.text = text;
            data.lifeTime = 0.0f;
            data.followObjs = null;
            data.offsetY = 0.0f;
            m_DamageTextList.Add(data);

            text.gameObject.SetActive(false);
        }
    }
Ejemplo n.º 2
0
 /// <summary>
 /// 交换I和J处的元素
 /// </summary>
 void _SwapHud(int i, int j)
 {
     m_TempData = m_DamageTextList[i];
     m_DamageTextList[i] = m_DamageTextList[j];
     m_DamageTextList[j] = m_TempData;
 }