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
Name | Type | Description |
---|
screen_width | Int | screen width |
screen_height | Int | screen height |
title | String | screen title |
fps | Int | frame per second |
init_flags | Int | initialization flags |
Initializes game framework
New(screen_width:Int, screen_height:Int, title:String)
Parameters
Name | Type | Description |
---|
screen_width | Int | screen width |
screen_height | Int | screen height |
title | String | screen title |
AddAnimatedImageSprite
Adds an image sprite to the framework
method : public : AddAnimatedImageSprite(file:String, clips:Vector<Rect>) ~ AnimatedImageSprite
Parameters
Name | Type | Description |
---|
file | String | file path to image asset |
clips | Vector<Rect> | vector of rendering rectangles |
Return
Adds an image sprite to the framework
method : public : AddAnimatedImageSprite(file:String) ~ AnimatedImageSprite
Parameters
Name | Type | Description |
---|
file | String | file path to image asset |
Return
AddFont
Adds a font
method : public : AddFont(file:String, size:Int) ~ Font
Parameters
Name | Type | Description |
---|
file | String | file path to font |
size | Int | font size |
Return
AddImageSprite
Adds an image sprite to the framework
method : public : AddImageSprite(file:String, colorkey:Color, render_rect:Rect) ~ ImageSprite
Parameters
Name | Type | Description |
---|
file | String | file path to image asset |
colorkey | Color | image color key |
render_rect | Rect | bounding rectangle to render |
Return
Adds an image sprite to the framework
method : public : AddImageSprite(file:String, colorkey:Color) ~ ImageSprite
Parameters
Name | Type | Description |
---|
file | String | file path to image asset |
colorkey | Color | image color key, may be Nil |
Return
Adds an image sprite to the framework
method : public : AddImageSprite(file:String) ~ ImageSprite
Parameters
Name | Type | Description |
---|
file | String | file path to image asset |
Return
AddMixChunk
Adds a sound mix chunk
method : public : AddMixChunk(file:String) ~ MixChunk
Parameters
Name | Type | Description |
---|
file | String | file path to sound asset |
Return
AddRectangle
Adds a rectangle to the framework
method : public : AddRectangle(w:Int, h:Int) ~ Rectangle
Parameters
Name | Type | Description |
---|
w | Int | rectangle width |
h | Int | rectangle height |
Return
AddTextSprite
Adds a text sprite to the framework
method : public : AddTextSprite() ~ TextSprite
Return
AddTitledImageSprite
Adds an tiled image to the framework
method : public : AddTitledImageSprite(file:String, colorkey:Color) ~ TitledImageSprite
Parameters
Name | Type | Description |
---|
file | String | file path to image asset |
colorkey | Color | image color key, may be Nil |
Return
BuildFromFile
Build assets from a Json file
method : public : BuildFromFile(file:String) ~ Bool
Parameters
Name | Type | Description |
---|
file | String | path to build file |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Clear
Clears the scene
method : public : Clear() ~ Nil
Debug
Prints debug message
function : Debug(debug_msg:String) ~ Nil
Parameters
Name | Type | Description |
---|
debug_msg | String | message |
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
Type | Description |
---|
Color | clear color |
GetColor
Get specified color
method : public : GetColor(name:String) ~ Color
Parameters
Name | Type | Description |
---|
name | String | name of color |
Return
Type | Description |
---|
Color | color |
GetEvent
Gets the framework event
method : public : GetEvent() ~ Event
Return
Type | Description |
---|
Event | framework event |
GetFont
Get specified font
method : public : GetFont(name:String) ~ Font
Parameters
Name | Type | Description |
---|
name | String | name of font |
Return
GetFps
Gets the frame per second
method : public : GetFps() ~ Int
GetImageSprite
Get specified image sprite
method : public : GetImageSprite(name:String) ~ ImageSprite
Parameters
Name | Type | Description |
---|
name | String | name of image sprite |
Return
GetMixChunk
Get mix chunk
method : public : GetMixChunk(name:String) ~ MixChunk
Parameters
Name | Type | Description |
---|
name | String | name of mix chunk |
Return
GetRectangle
Get specified rectangle
method : public : GetRectangle(name:String) ~ Rectangle
Parameters
Name | Type | Description |
---|
name | String | name of rectangle |
Return
GetRenderer
Gets the framework renderer
method : public : GetRenderer() ~ Renderer
Return
Type | Description |
---|
Renderer | framework renderer |
GetTextSprite
Get specified text sprite
method : public : GetTextSprite(name:String) ~ TextSprite
Parameters
Name | Type | Description |
---|
name | String | name of text sprite |
Return
IsOk
Initialization status flag
method : public : IsOk() ~ Bool
Return
Type | Description |
---|
Bool | true if initialized, false otherwise |
Quit
Closes the framework
method : public : Quit() ~ Nil
RemoveFont
Remove chunk from framework
method : public : RemoveFont(font:Font) ~ Bool
Parameters
Name | Type | Description |
---|
font | Font | chunk to remove |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
RemoveMixChunk
Remove chunk from framework
method : public : RemoveMixChunk(mix_chunk:MixChunk) ~ Bool
Parameters
Name | Type | Description |
---|
mix_chunk | MixChunk | chunk to remove |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
RemoveSprite
Remove shape from framework
method : public : RemoveSprite(shape:Shape) ~ Bool
Parameters
Name | Type | Description |
---|
shape | Shape | shape to remove |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
SetClearColor
Sets the clear color
method : public : SetClearColor(color:Color) ~ Nil
Parameters
Name | Type | Description |
---|
color | Color | clear color |
SetFont
Sets the game font
method : public : SetFont(font:Font) ~ Nil
Parameters
Name | Type | Description |
---|
font | Font | game font |
SetMusicChunk
Adds music chunk
method : public : SetMusicChunk(file:String) ~ MixMusic
Parameters
Name | Type | Description |
---|
file | String | file path to sound asset |
Return
Show
Shows the scene
method : public : Show() ~ Nil