2022-07-13【Math】帧率平滑

2022-07-12  本文已影响0人  持刀的要迟到了

Desmos | 图形计算器

image.png
    /// <summary>
    /// 计算接收帧速率,该速率为本地认可的服务器真实平均帧速率
    /// </summary>
    //public static void CalculateServerRecvFps(this ClientInfo self)
    //{
    //    ClientInfo.c_ServerFpsFrmTimes[self.m_ServerFpsTimePointer] = Time.time;
    //    //Debug.LogError(">> " + m_ServerFpsTimePointer + " " + c_ServerFpsFrmTimes[m_ServerFpsTimePointer]);

    //    self.m_ServerFpsTimePointer++;
    //    if (self.m_ServerFpsTimePointer == ClientInfo.c_ServerFpsFrmcount)
    //    {
    //        self.m_ServerFpsTimePointer = 0;
    //    }

    //    if (self.serverFpsDataInited)
    //    {
    //        self.serverRecvTimeReal = (Time.time - ClientInfo.c_ServerFpsFrmTimes[self.m_ServerFpsTimePointer]) * ClientInfo.c_OneDivServerFpsFrmcount;
    //        //Debug.LogError(m_ServerFpsTimePointer + " " + c_ServerFpsFrmTimes[m_ServerFpsTimePointer]);
    //    }
    //    else
    //    {
    //        if (self.m_ServerFpsTimePointer == 0) self.serverFpsDataInited = true;
    //        self.serverRecvTimeReal = self.ServerSimulateTimeExpect;  // 没初始化好
    //    }
    //}
上一篇下一篇

猜你喜欢

热点阅读