示例#1
0
 public void LeftBoxSingleSelect(TeachHitObjectItem item)
 {
     if (m_LeftBoxCurrentItem != null)
     {
         m_LeftBoxCurrentItem.SetUnselect();
     }
     m_LeftBoxCurrentItem = item;
 }
示例#2
0
    public void SelectWord(TeachHitObjectItem item)
    {
        if (m_CurrentSelectWord != null)
        {
            m_CurrentSelectWord.SetUnselect();
            if (m_CurrentSelectWord.m_Index == item.m_Index)
            {
                m_CurrentSelectWord = null;
                return;
            }
        }

        m_CurrentSelectWord = item;
    }
示例#3
0
 public void SelectOneSentence(TeachHitObjectItem item)
 {
     if (m_CurrentSelectSentence != null)
     {
         m_CurrentSelectSentence.SetUnselect();
         ClearSentenceContentBox();
         if (m_CurrentSelectSentence.m_Index == item.m_Index)
         {
             return;
         }
     }
     m_CurrentSelectSentence  = item;
     m_SentenceStartTime.text = m_Sentences[m_CurrentSelectSentence.m_Index - 1].m_StartTime.ToString();
     m_SentenceEndTime.text   = m_Sentences[m_CurrentSelectSentence.m_Index - 1].m_EndTime.ToString();
     ShowOneSentence();
 }
示例#4
0
    public void SelectSentence(TeachHitObjectItem item)
    {
        if (m_CurrentSelectSentence != null)
        {
            m_CurrentSelectSentence.SetUnselect();
            ClearChildContent(m_WordContent.transform);
            if (m_CurrentSelectSentence.m_Index == item.m_Index)
            {
                m_CurrentSelectSentence = null;
                return;
            }
        }

        m_CurrentSelectSentence = item;
        CreateWordContent();
    }
示例#5
0
 //list中始终保证最多有两个元素
 public void RightBoxSelect(TeachHitObjectItem item)
 {
     if (m_CurrentSelectItemsInRightBox.Contains(item))
     {
         item.SetUnselect();
         m_CurrentSelectItemsInRightBox.Remove(item);
     }
     else if (m_CurrentSelectItemsInRightBox.Count == 0)
     {
         m_CurrentSelectItemsInRightBox.Add(item);
     }
     else if (m_CurrentSelectItemsInRightBox.Count == 1)
     {
         if (m_CurrentSelectItemsInRightBox[0].m_Index > item.m_Index)
         {
             m_CurrentSelectItemsInRightBox.Insert(0, item);
         }
         else
         {
             m_CurrentSelectItemsInRightBox.Add(item);
         }
     }
     else
     {
         if (m_CurrentSelectItemsInRightBox[0].m_Index > item.m_Index)
         {
             m_CurrentSelectItemsInRightBox[0].SetUnselect();
             m_CurrentSelectItemsInRightBox.RemoveAt(0);
             m_CurrentSelectItemsInRightBox.Insert(0, item);
         }
         else
         {
             m_CurrentSelectItemsInRightBox[1].SetUnselect();
             m_CurrentSelectItemsInRightBox.RemoveAt(1);
             m_CurrentSelectItemsInRightBox.Add(item);
         }
     }
 }