All Bundles

GameFramework

Game framework

Operations

New

Initializes game framework

New(screen_width:Int, screen_height:Int, title:String, fps:Int, init_flags:Int)
Parameters
NameTypeDescription
screen_widthIntscreen width
screen_heightIntscreen height
titleStringscreen title
fpsIntframe per second
init_flagsIntinitialization flags

Initializes game framework

New(screen_width:Int, screen_height:Int, title:String)
Parameters
NameTypeDescription
screen_widthIntscreen width
screen_heightIntscreen height
titleStringscreen title

AddAnimatedImageSprite

Adds an image sprite to the framework

method : public : AddAnimatedImageSprite(file:String, clips:Vector) ~ AnimatedImageSprite
Parameters
NameTypeDescription
fileStringfile path to image asset
clipsVector<Rect>vector of rendering rectangles

Return
TypeDescription
AnimatedImageSpriteanimated image sprite

Adds an image sprite to the framework

method : public : AddAnimatedImageSprite(file:String) ~ AnimatedImageSprite
Parameters
NameTypeDescription
fileStringfile path to image asset

Return
TypeDescription
AnimatedImageSpriteanimated image sprite

AddFont

Adds a font

method : public : AddFont(file:String, size:Int) ~ Font
Parameters
NameTypeDescription
fileStringfile path to font
sizeIntfont size

Return
TypeDescription
Fontfont

AddImageSprite

Adds an image sprite to the framework

method : public : AddImageSprite(file:String, colorkey:Color, render_rect:Rect) ~ ImageSprite
Parameters
NameTypeDescription
fileStringfile path to image asset
colorkeyColorimage color key
render_rectRectbounding rectangle to render

Return
TypeDescription
ImageSpriteimage sprite

Adds an image sprite to the framework

method : public : AddImageSprite(file:String, colorkey:Color) ~ ImageSprite
Parameters
NameTypeDescription
fileStringfile path to image asset
colorkeyColorimage color key, may be Nil

Return
TypeDescription
ImageSpriteimage sprite

Adds an image sprite to the framework

method : public : AddImageSprite(file:String) ~ ImageSprite
Parameters
NameTypeDescription
fileStringfile path to image asset

Return
TypeDescription
ImageSpriteimage sprite

AddMixChunk

Adds a sound mix chunk

method : public : AddMixChunk(file:String) ~ MixChunk
Parameters
NameTypeDescription
fileStringfile path to sound asset

Return
TypeDescription
MixChunkmix chunk

AddRectangle

Adds a rectangle to the framework

method : public : AddRectangle(w:Int, h:Int) ~ Rectangle
Parameters
NameTypeDescription
wIntrectangle width
hIntrectangle height

Return
TypeDescription
Rectanglerectangle

AddTextSprite

Adds a text sprite to the framework

method : public : AddTextSprite() ~ TextSprite
Return
TypeDescription
TextSpritetext sprite

AddTitledImageSprite

Adds an tiled image to the framework

method : public : AddTitledImageSprite(file:String, colorkey:Color) ~ TitledImageSprite
Parameters
NameTypeDescription
fileStringfile path to image asset
colorkeyColorimage color key, may be Nil

Return
TypeDescription
TitledImageSpritetiled image

BuildFromFile

Build assets from a JSON file

method : public : BuildFromFile(file:String) ~ Bool
Parameters
NameTypeDescription
fileStringpath to build file

Return
TypeDescription
Booltrue if successful, false otherwise

Clear

Clears the scene

method : public : Clear() ~ Nil

Debug

Prints debug message

function : public : Debug(debug_msg:String) ~ Nil
Parameters
NameTypeDescription
debug_msgStringmessage

FrameEnd

Sets the end frame

method : public : FrameEnd() ~ Nil

FrameStart

Sets the start frame

method : public : FrameStart() ~ Nil

FreeFonts

Removes all font

method : public : FreeFonts() ~ Nil

FreeMixChunks

Removes all mix chunks

method : public : FreeMixChunks() ~ Nil

FreeMusic

Free music

method : public : FreeMusic() ~ Nil

FreeShapes

Removes all shapes

method : public : FreeShapes() ~ Nil

GetClearColor

Gets the clear color

method : public : GetClearColor() ~ Color
Return
TypeDescription
Colorclear color

GetColor

Get specified color

method : public : GetColor(name:String) ~ Color
Parameters
NameTypeDescription
nameStringname of color

Return
TypeDescription
Colorcolor

GetEvent

Gets the framework event

method : public : GetEvent() ~ Event
Return
TypeDescription
Eventframework event

GetFont

Get specified font

method : public : GetFont(name:String) ~ Font
Parameters
NameTypeDescription
nameStringname of font

Return
TypeDescription
Fontfont

GetFps

Gets the frame per second

method : public : GetFps() ~ Int

GetImageSprite

Get specified image sprite

method : public : GetImageSprite(name:String) ~ ImageSprite
Parameters
NameTypeDescription
nameStringname of image sprite

Return
TypeDescription
ImageSpriteimage sprite

GetMixChunk

Get mix chunk

method : public : GetMixChunk(name:String) ~ MixChunk
Parameters
NameTypeDescription
nameStringname of mix chunk

Return
TypeDescription
MixChunkmix chunk

GetRectangle

Get specified rectangle

method : public : GetRectangle(name:String) ~ Rectangle
Parameters
NameTypeDescription
nameStringname of rectangle

Return
TypeDescription
Rectanglerectangle

GetRenderer

Gets the framework renderer

method : public : GetRenderer() ~ Renderer
Return
TypeDescription
Rendererframework renderer

GetTextSprite

Get specified text sprite

method : public : GetTextSprite(name:String) ~ TextSprite
Parameters
NameTypeDescription
nameStringname of text sprite

Return
TypeDescription
TextSpritetext sprite

IsOk

Initialization status flag

method : public : IsOk() ~ Bool
Return
TypeDescription
Booltrue if initialized, false otherwise

Quit

Closes the framework

method : public : Quit() ~ Nil

RemoveFont

Remove chunk from framework

method : public : RemoveFont(font:Font) ~ Bool
Parameters
NameTypeDescription
fontFontchunk to remove

Return
TypeDescription
Booltrue if successful, false otherwise

RemoveMixChunk

Remove chunk from framework

method : public : RemoveMixChunk(mix_chunk:MixChunk) ~ Bool
Parameters
NameTypeDescription
mix_chunkMixChunkchunk to remove

Return
TypeDescription
Booltrue if successful, false otherwise

RemoveSprite

Remove shape from framework

method : public : RemoveSprite(shape:Shape) ~ Bool
Parameters
NameTypeDescription
shapeShapeshape to remove

Return
TypeDescription
Booltrue if successful, false otherwise

SetClearColor

Sets the clear color

method : public : SetClearColor(color:Color) ~ Nil
Parameters
NameTypeDescription
colorColorclear color

SetFont

Sets the game font

method : public : SetFont(font:Font) ~ Nil
Parameters
NameTypeDescription
fontFontgame font

SetMusicChunk

Adds music chunk

method : public : SetMusicChunk(file:String) ~ MixMusic
Parameters
NameTypeDescription
fileStringfile path to sound asset

Return
TypeDescription
MixMusicmusic chunk

Show

Shows the scene

method : public : Show() ~ Nil