Пример #1
0
 void FixedUpdate()
 {
     ///*
     //更新迷雾纹理
     //*/
     if (m_MixTime >= ReflshSpeed)
     {
         if (m_RefreshTime >= ReflshSpeed)
         {
             m_RefreshTime = 0.0f;
             if (m_Map.RefreshFOWTexture())
             {
                 m_Renderer.SetFogFade(SetFogFade);
                 m_MixTime             = 0;
                 m_IsFieldDatasUpdated = false;
                 //m_Renderer.SetFogTexture(m_Map.GetFOWTexture());
             }
         }
         else
         {
             m_RefreshTime += Time.deltaTime * kRefreshTextureSpeed;
         }
     }
     else
     {
         m_MixTime += Time.deltaTime * kDispearSpeed;
         m_Renderer.SetFogFade(m_MixTime);
     }
 }
Пример #2
0
    void FixedUpdate()
    {
        /*
         * 更新迷雾纹理
         */
        if (m_MixTime >= 1.0f)
        {
            if (m_RefreshTime >= 0.5f)
            {
                m_RefreshTime = 0.0f;
                if (m_Map.RefreshFOWTexture())
                {
                    if (m_Map.m_MaskTexture.m_UpdateMark != FOWMaskTexture.UpdateMark.EndUpdate)
                    {
                        m_Renderer.SetFogFade(0);
                        m_MixTime = 0;
                    }

                    m_IsFieldDatasUpdated = false;
                    //m_Renderer.SetFogTexture(m_Map.GetFOWTexture());
                }
            }
            else
            {
                m_RefreshTime += Time.deltaTime * kRefreshTextureSpeed;
            }
        }
        else
        {
            m_MixTime += Time.deltaTime * kDispearSpeed;
            m_Renderer.SetFogFade(m_MixTime);
        }
    }