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("回放结束"); } } }
// Update is called once per frame void Update() { frameIdx++; ProtoHandler.Update(); }