Back

AddSprite

Hello World

Adds a sprite object to the game.

gfx.AddSprite( sprite, x, y, w, h, angle, alpha )

Example

cfg.Game;

function OnLoad()
{
    droid = gfx.CreateSprite( "/Sys/Img/Hello.png" );
}

function OnReady()
{
    gfx.AddSprite( droid, 0.2, 0.4, 0.5 );
    gfx.Play();
}
Copy All       Run      
number: fraction (0..1)
app object: Sprite