コード例 #1
0
    public void Update()
    {
        ProtoHandler.Update();
        if (!Started)
        {
            //if (OnUpdates != null)
            //    OnUpdates();
            return;
        }

        AccumilatedTime = AccumilatedTime + Convert.ToInt32((Time.deltaTime * 1000));
        while (AccumilatedTime > LogicFrameLength)
        {
            FrameReplay.deltaTime = delta;
            UdpClientProxy.Update();
            LogicFrame();
            AccumilatedTime = AccumilatedTime - LogicFrameLength;
            time           += (LogicFrameLength / 1000.0f);
        }

        if (Main.Ins.CombatData.Replay)
        {
            if (LogicTurnIndex == Main.Ins.CombatData.GRecord.frames.Count)
            {
                OnBattleFinished();
                U3D.PopupTip("回放结束");
            }
        }
    }
コード例 #2
0
 // Update is called once per frame
 void Update()
 {
     frameIdx++;
     ProtoHandler.Update();
 }