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

RB

Class

Description

An all-encompassing class which exposes all of the RetroBlit features with convenient, and easy to use methods!

All methods in this class are static, there is no need to pass or store the RetroBlit state in your game, simply use the RetroBlit class from anywhere in your game at any time.

Enumerations

AssetSource Asset loading source type
AssetStatus Asset loading status
Effect Post-processing effect type
Filter Texture filter to apply when using custom shaders
PixelStyle Display pixel style
Result Asset loading result

Constants

ALIGN_H_CENTER Center horizontally
ALIGN_H_LEFT Align to the left edge
ALIGN_H_RIGHT Align to the right edge
ALIGN_V_BOTTOM Align to the bottom edge
ALIGN_V_CENTER Center vertically
ALIGN_V_TOP Align to the top edge
BTN_A A button on gamepad.
BTN_ABXY A, B, X, or Y button on gamepad
BTN_B B button on gamepad.
BTN_DOWN Down D-pad button on gamepad.
BTN_LEFT Left D-pad button on gamepad.
BTN_LS Left shoulder button on gamepad.
BTN_MENU Menu button on gamepad.
BTN_POINTER_A Left mouse button, or first finger touch.
BTN_POINTER_ANY Any finger touch, left, right, or middle mouse button.
BTN_POINTER_B Right mouse button.
BTN_POINTER_C Middle mouse button, or third finger touch
BTN_POINTER_D The forth finger touch
BTN_RIGHT Right D-pad button on gamepad.
BTN_RS Right shoulder button on gamepad.
BTN_SHOUDLER Any shoulder button on gamepad.
BTN_SYSTEM System button on any gamepad
BTN_UP Up D-pad button on gamepad.
BTN_X X button on gamepad.
BTN_Y Y button on gamepad.
FLIP_H Flip sprite horizontally
FLIP_V Flip sprite vertically
NO_ESCAPE_CODES Ignore all RetroBlit string escape codes
NO_INLINE_COLOR Ignore any inline color changes when printing text
PIXEL_BUFFER_UNCHANGED Pixel buffer is unchanged
PLAYER_ANY Any player input flag.
PLAYER_FOUR Player four input flag.
PLAYER_ONE Player one input flag.
PLAYER_THREE Player three input flag.
PLAYER_TWO Player two input flag.
ROT_180_CCW Rotate sprite 180 degrees counter-clockwise.
ROT_180_CW Rotate sprite 180 degrees clockwise.
ROT_270_CCW Rotate sprite 270 degrees counter-clockwise.
ROT_270_CW Rotate sprite 270 degrees clockwise.
ROT_90_CCW Rotate sprite 90 degrees counter-clockwise.
ROT_90_CW Rotate sprite 90 degrees clockwise
SPRITE_EMPTY An empty sprite index, use this to clear a tile in a tilemap
SPRITE_INVALID Invalid sprite
TEXT_OVERFLOW_CLIP Clip text to given rectangular area
TEXT_OVERFLOW_WRAP Wrap text to the next line when it overflows

Properties

DisplaySize Display size as given in IRetroBlitGame.QueryHardware.
DisplaySurface The display surface, which can then be rendered in a custom fashion.
FPS The target FPS as set by IRetroBlitGame.QueryHardware.
Game Reference to an instance of IRetroBlitGame game running under RetroBlit.
MapChunkSize Tilemap chunk size as given in IRetroBlitGame.QueryHardware
MapLayers Amount of map layers as given in IRetroBlitGame.QueryHardware
MapSize Tilemap maximum size as given in IRetroBlitGame.QueryHardware.
Ticks Represents the count of calls to IRetroBlitGame.Update since startup, or since RB.TicksReset was called.
UpdateInterval Update interval which is equivalent to (1.0f / RB.FPS).

Delegates

InputOverrideMethod Delegate for overriding input mapping

Methods

AlphaGet Get the current alpha transparency value
AlphaSet Set the alpha transparency value for drawing
AnyKeyDown Return true if any key, touch, gamepad or mouse button is held down
AnyKeyPressed Return true if any key is down and there are was no key down in the last call to IRetroBlitGame.Update
AnyKeyReleased Return true all keys are up and there are was at least one key down in the last call to IRetroBlitGame.Update
BatchDebugDisable Disable batch debugging overlay
BatchDebugEnable Enable a batch debugging overlay which shows how many draw batches are being used
ButtonDown Return true if any of the given button(s) are held down.
ButtonPressed Return true if any of the given button(s) went from an up to down state since IRetroBlitGame.Update was last called.
ButtonReleased Return true if any of the given button(s) went from a down to up state since IRetroBlitGame.Update was last called.
CameraGet Get the current camera position
CameraReset Reset the camera position back to 0, 0. This is equivalent to RB.CameraSet(0, 0).
CameraSet Set the current camera position
Clear (2 overloads) Clear the display
ClipDebugDisable Disable clip region debugging
ClipDebugEnable Enable clip region debugging
ClipGet Get the current clipping region.
ClipReset Reset the clipping region
ClipSet Set a rectangular clipping region
DisplayModeSet Set display mode to given resolution and pixel style.
DrawCopy (8 overloads) Copy a rectangular region from the sprite sheet to the display
DrawEllipse Draw an ellipse outline
DrawEllipseFill Draw a filled ellipse
DrawEllipseInvertedFill Draw an inversely filled ellipse
DrawLine (3 overloads) Draw a line between two points
DrawLineTextured (12 overloads) Draw a textured line between two points
DrawMapLayer (2 overloads) Draw the given map layer to the display.
DrawNineSlice (11 overloads) Draw a nine-slice sprite
DrawPixel Draw a pixel.
DrawPixelBuffer (8 overloads) Draw a pixel buffer.
DrawRect (2 overloads) Draw a rectangle outline
DrawRectFill (2 overloads) Draw a filled rectangle
DrawSprite (40 overloads) Draw a sprite from the current sprite sheet
DrawTriangle (2 overloads) Draw a triangle outline
DrawTriangleFill (2 overloads) Draw a filled triangle
EffectApplyNow Apply post-processing effects immediately
EffectFilter Specify texture filtering to use with custom post-processing effect shader.
EffectReset Reset all post-processing effect back to default/off state
EffectSet (4 overloads) Set values for the given post processing effect
EffectShader Set a custom post-processing effect shader.
FontInlineIndexSetup (2 overloads) Setup a FontAsset index table
Initialize Initialize RetroBlit with the given game instance.
InputOverride Provide a delegate for overriding RetroBlit button mapping
InputString Returns a string of characters entered since last IRetroBlitGame.Update call.
KeyDown Return true if given key is held down
KeyPressed Return true if given key specified by keyCode went from an up to down state since last call to IRetroBlitGame.Update
KeyReleased Return true if given key specified by keyCode went from a down to up state since last call to IRetroBlitGame.Update
LoadingAssetsCount Get a count of current asynchronously loading assets
MapChunkEmpty Check if a map chunk at the given position is empty/unloaded
MapClear (2 overloads) Clear the tilemap
MapDataGet< T > Get user tile data at the given layer and tile position
MapDataSet< T > Set user tile data at the given layer and tile position
MapLayerSpriteSheetSet Set the sprite sheet to be used by the given tilemap layer.
MapShiftChunks Shift the tilemap chunks by the given amount chunks in the X and Y direction
MapSpriteGet Get the tilemap sprite at the given layer and tile position
MapSpriteSet (10 overloads) Set the tilemap sprite at the given layer and tile position, with optional flags.
MusicCrossFadeSet Set music crossfade duration and overlap
MusicIsPlaying Check if Music is currently playing
MusicPitchGet Get the current music pitch.
MusicPitchSet Set the music pitch
MusicPlay Play music from the givenRB.AudioAsset
MusicStop Stop currently playing music
MusicVolumeGet Get the current music volume
MusicVolumeSet Set the music volume
NativeScreenToDisplayPos Translate native screen coordinates to RetroBlit display coordinates
Offscreen Switch rendering target to a sprite sheet
Onscreen Switch to drawing to the display
PackedSpriteGet (6 overloads) Get packed sprite info for the given sprite
PackedSpriteID (2 overloads) Helper function for getting a PackedSpriteID
PointerPos Get the current pointer position
PointerPosValid Returns true if the pointer position is valid current touches.
PointerScrollDelta Get the delta of the mouse scroll wheel position since last IRetroBlitGame.Update call
PresentDisable Disable rendering to screen.
PresentEnable Re-enable rendering to screen
Print (12 overloads) Print text to the display
PrintMeasure (8 overloads) Measures a text string without printing it
ShaderApplyNow Apply shader immediately
ShaderReset Reset the shader back to the default RetroBlit shader
ShaderSet Set the current shader
SoundIsPlaying Check if a sound is playing by using its SoundReference.
SoundListenerPosSet Set sound listener position.
SoundLoopSet Specify whether the currently playing sound specified by SoundReference should keep looping.
SoundPitchGet Get the pitch of a currently playing sound with its SoundReference
SoundPitchSet Set the pitch of a currently playing sound with its SoundReference
SoundPlay Play the sound from the given AudioAsset
SoundPosSet Set position of a playing sound.
SoundSourceGet Get the Unity AudioSource of a playing sound.
SoundStop Stop the sound currently playing by using its SoundReference
SoundVolumeGet Get the volume of a currently playing sound with its SoundReference
SoundVolumeSet Set the volume of a currently playing sound with its SoundReference
SpriteIndex (3 overloads) Helper function for calculating sprite index given sprite sheet column and row.
SpriteSheetGet Gets the current sprite sheet.
SpriteSheetSet Set the current sprite sheet
TicksReset Reset the ticks counter
TintColorGet Get the current tint color.
TintColorSet Set the tint color for drawing