Back
AddBackground
Hello World
Adds a static background to your game.
gfx.AddBackground(
obj
)
Example - Basic
cfg
.
Game
;
function
OnLoad
(
)
{
sky
=
gfx
.
CreateBackground
(
"/Sys/Img/Sky.jpg"
,
"stretch"
)
;
}
function
OnReady
(
)
{
gfx
.
AddBackground
(
sky
)
;
gfx
.
Play
(
)
;
}
Copy
Copy All
Run
game object:
Background