BGE

Classes

AnimatedImage
Canvas
CircleCollider
Collider
Drawable
DrawablePolygon
DrawableRectangle
DrawableText
DrawableWithOutline
Game
GameEntity
GameInput
GameTimer
Image
RectangleCollider
Room
Sprite
SpriteAnimation
TagList

Methods

(static) ArrayInsert(array, index, value) → {object}

Parameters:
Name Type Description
array object
index integer
value dynamic
Source:

(static) buttonNameFromCode(buttonCode) → {string}

Parameters:
Name Type Description
buttonCode integer
Source:

(static) cloneArray(originalopt) → {object}

Clone an array (shallow)

Parameters:
Name Type Attributes Default Description
original object <optional>
[]

the original array to be clones

Source:

(static) Colors() → {object}

Source:

(static) ColorsRGB() → {object}

Source:

(static) DrawCircleOutline(draw2d, line_count, x, y, radius, rgba) → {void}

Parameters:
Name Type Description
draw2d object
line_count integer
x float
y float
radius float
rgba integer
Source:

(static) DrawRectangleOutline(draw2d, x, y, width, height, rgba) → {void}

Parameters:
Name Type Description
draw2d object
x float
y float
width float
height float
rgba integer
Source:

(static) DrawScaledAndRotatedObject(draw2d, x, y, scale_x, scale_y, theta, drawable, coloropt) → {void}

NOTE: This function is unsafe! It creates an roBitmap of the required size to be able to both scale and rotate the drawing, this action requires free video memory of the appropriate amount.

Parameters:
Name Type Attributes Default Description
draw2d object
x float
y float
scale_x float
scale_y float
theta float
drawable object
color integer <optional>
-1
Source:

(static) drawText(draw2d, text, x, y, font, alignmentopt, coloropt) → {void}

Draws text to the screen

Parameters:
Name Type Attributes Default Description
draw2d object

The iDraw2d instance to use

text string

the test to display

x integer
y integer
font object

Font object to use

alignment string <optional>
"left"

Alignment - "left", "right" or "center"

color integer <optional>
-1

RGBA color to use

Source:

(static) GetColor(name) → {integer}

Parameters:
Name Type Description
name string
Source:

(static) GetColorRGB(name) → {integer}

Parameters:
Name Type Description
name string
Source:

(static) getNumberOfLinesInAString(text) → {integer}

Gets the number of lines in a string by counting the newlines

Parameters:
Name Type Description
text string
Source:

(static) getRandomColorRGB() → {integer}

Source:

(static) HSVtoRGBA(hPercent, sPercent, vPercent, aopt) → {integer}

Parameters:
Name Type Attributes Default Description
hPercent float
sPercent float
vPercent float
a dynamic <optional>
invalid
Source:

(static) isValidEntity(entity) → {boolean}

Parameters:
Name Type Description
entity object
Source:

(static) lastInStr(text, substring) → {integer}

Finds the index of the last time a substring appears in a string

Parameters:
Name Type Description
text string
substring string
Source:

(static) numberToFixed(num, precision) → {string}

Given a float number, returns the number with a fixed numbers of decimals as a string

Parameters:
Name Type Description
num float
precision integer
Source:

(static) pointArraysEqual(aopt, bopt) → {boolean}

Check if two arrays of points are teh same - that is, if each point, in order has same x and y values

Parameters:
Name Type Attributes Default Description
a object <optional>
[]

the first array

b object <optional>
[]

the second array

Source:

(static) registryRead(registry_section, key, default_valueopt) → {dynamic}

Parameters:
Name Type Attributes Default Description
registry_section string
key string
default_value dynamic <optional>
invalid
Source:

(static) registryWrite(registry_section, key, value) → {void}

Parameters:
Name Type Description
registry_section string
key string
value dynamic
Source:

(static) RGBAtoRGBA(red, green, blue, alphaopt) → {integer}

Parameters:
Name Type Attributes Default Description
red integer
green integer
blue integer
alpha float <optional>
1
Source:

(static) TexturePacker_GetRegions(atlas, bitmap) → {object}

Parameters:
Name Type Description
atlas dynamic
bitmap object
Source: