Creates a background.
Example - Scroll
cfg.Game;
function OnLoad()
{
sky = gfx.CreateBackground( "/Sys/Img/Sky.jpg", "stretch" );
}
function OnReady()
{
gfx.AddBackground( sky );
gfx.Play();
}
function OnAnimate(t,dt)
{
sky.Scroll(-dt/1000, 0);
}
def OnLoad():
global sky
sky = gfx.CreateBackground("/Sys/Img/Sky.jpg", "stretch")
def OnReady():
gfx.AddBackground(sky)
gfx.Play()
def OnAnimate(t, dt):
sky.Scroll(-dt/1000, 0)