AudioAsset
Ease
FastString
FontAsset
NineSlice
PackedSprite
PackedSpriteID
RB
   HardwareSettings
   IRetroBlitGame
RBAsset
Rect2i
ShaderAsset
SoundReference
SpriteGrid
SpriteSheetAsset
TMXMapAsset
   TMXLayer
   TMXLayerLoadState
   TMXObject
   TMXObjectGroup
   TMXProperties
Vector2i

RB.UpdateInterval

Property  -  Static Read Only

Type

float

Description

The update interval in seconds between calls to IRetroBlitGame.Update. RetroBlit runs a fixed time update loop, and so this value is does not change at runtime, and it is derived from the initial RB.FPS value set by IRetroBlitGame.QueryHardware.

In variable time step frameworks it is important to scale all the calculations you do in your game logic by the current time step. This is not important in a fixed time step framework like RetroBlit, but it may still be wise to do so if you ever plan to change your fixed time step in the future by passing a different FPS value in IRetroBlitGame.QueryHardware.

RB.UpdateInterval is equivalent to (1.0f / RB.FPS).

Example

void Update()
{
    pos.x += 10.0f * RB.UpdateInterval;
}

See Also

RB.FPS
IRetroBlitGame.Update
IRetroBlitGame.QueryHardware