mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2025-06-19 19:26:36 +02:00
add time delta context to scene
This commit is contained in:
17
framework/common_components/src/mm/components/time_delta.hpp
Normal file
17
framework/common_components/src/mm/components/time_delta.hpp
Normal 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;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user