Пример #1
0
 //void
 public void RockBox(OpenParma pParam)
 {
     m_OpenParam[pParam.byOpenIndex] = pParam;//映射相对位置
     if (m_goBox[pParam.byOpenIndex])
     {
         if (pParam.bImmediately)//立即显示
         {
             OnBoxRocked(pParam.byOpenIndex);
         }
         else
         {
             if (pParam.bManual)
             {
                 m_goBox[pParam.byOpenIndex].transform.GetChild(0).GetChild(0).GetComponent <Animator>().SetBool(Animator.StringToHash("Rock"), true);
             }
             else
             {
                 m_goBox[pParam.byOpenIndex].transform.GetChild(0).GetChild(0).GetComponent <Animator>().SetBool(Animator.StringToHash("BoxScale"), true);
             }
         }
     }
 }
Пример #2
0
        public void OnOpenBox(bool bImmediately, uint byIndex, uint byRewardid, uint byChestOnceID, bool bEffect)
        {
            if (m_BtnInfo[byIndex].m_IsChecked)
            {
                return;
            }
            if (!m_nChestRewardidList.Remove((byte)byRewardid))
            {
                return;
            }
            m_BtnInfo[byIndex].m_IsChecked = true;
            byte      byOpenCount = CheckedCount();
            OpenParma pParam      = new OpenParma();

            pParam.bManual      = bEffect;
            pParam.bOpen        = true;
            pParam.bImmediately = bImmediately;
            pParam.fDelayOpen   = 0.5f;

            pParam.byOpenCount   = byOpenCount;
            pParam.byChestTypeID = m_byChestTypeID;

            pParam.byOpenIndex   = (byte)byIndex;
            pParam.byRewardid    = (byte)byRewardid;
            pParam.byChestOnceID = (byte)byChestOnceID;

            m_BoxShow.RockBox(pParam);

            if (byOpenCount > FishConfig.Instance.m_ChestInfo.ChestMap[m_byChestTypeID].CostInfo.MaxCostNum)
            {
                m_fMessageDelay = 3.0f;
            }
            else
            {
                m_fMessageDelay = 0.2f;
            }
        }
Пример #3
0
 public void BoxRocked(OpenParma pParam)
 {
     ShowReward(pParam.bImmediately, pParam.byOpenIndex, pParam.byRewardid, pParam.byChestOnceID, pParam.bManual);
     SetCostInfo(pParam.byOpenCount, pParam.byChestTypeID);
 }