add time delta context to scene

This commit is contained in:
2021-01-17 16:16:16 +01:00
parent 8e8ac6c0be
commit 9bcaf87788
3 changed files with 23 additions and 2 deletions

View File

@ -0,0 +1,17 @@
#pragma once
namespace MM::Components {
// this is a context-variable / "component-singleton".
// it is used to retirve timing information about the tick.
// it is "read-only" for the systems and filled in by the service
// holding the scene.
struct TimeDelta {
float tickDelta = 1.f/60.f;
// this is optionally filled in
// it turned out, that sound playback needs the factor
float deltaFactor = 1.f;
};
}