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

RB.KeyDown

Method  -  Static

public static bool KeyDown(KeyCode keyCode)

Parameters

keyCode KeyCode Key code

Returns

bool

True if key held down

Description

Return true if given key specified by keyCode is held down.

Example

void Update() {
    if (RB.KeyDown(UnityEngine.KeyCode.Z)) {
        FireLasers();
    }
}

See Also

RB.KeyReleased
RB.KeyPressed
RB.InputString

See Docs

Features - Keyboard