|
Rebel Fork Framework
|
#include <Urho3D/Replica/TickSynchronizer.h>
Public Member Functions | |
| TickSynchronizer (unsigned leaderFrequency, bool isServer) | |
| void | SetFollowerFrequency (unsigned followerFrequency) |
| unsigned | GetFollowerFrequency () const |
| unsigned | Synchronize (float overtime) |
| void | Update (float timeStep) |
| Update follower clock within one tick of leader clock. | |
| unsigned | GetPendingFollowerTicks () const |
| Return number of the follower clock ticks that are expected to happen during current engine update. | |
| float | GetFollowerAccumulatedTime () const |
| Return amount of time elapsed after latest follower tick. | |
Private Member Functions | |
| void | NormalizeOnClient () |
Helper class that synchronizes two fixed-timestep clocks. Leader and follower ticks are considered synchronized if their beginnings logically correspond to the same moment in time.
| unsigned Urho3D::TickSynchronizer::Synchronize | ( | float | overtime | ) |
Synchronize with tick of the leader clock. Overtime specifies how much time passed since leader clock tick. Returns number of follower clock ticks before leader and follower clocks are synchronized.