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

RB.TicksReset

Method  -  Static

public static void TicksReset()

Parameters

No parameters.

Returns

Nothing.

Description

Resets the ticks counter back to 0. The tick counter is increased once per every call to RB.IRetroBlitGame.Update. The current tick counter value can be retrieved with the RB.Ticks property.

Example

void Update() {
    if (RB.KeyDown(KeyCode.Space)) {
        RB.TicksReset();
    }
}

int DrawAnimatedSprite(Vector2i pos, int firstFrame, int totalFrames)
{
    RB.Print(new Vector2i(44), Color.white, RB.Ticks + " frames have passed.");
}

See Also

RB.Ticks