Skip to main content

Background

The background interface

Background.id = "stars"
Background.speed = { x = 5.0, y = 3.0 }

Properties

id

Background.id: string

Get/Set the background identifier (e.g. "stars")

pos

Background.pos: table

Get/Set the background position (x/y)

x

Background.x: number

Get/Set the background horizontal position

y

Background.y: number

Get/Set the background vertical position

speed

Background.speed: table

Get/Set the background speed (x/y)

speed_x

Background.speed_x: number

Get/Set the background horizontal speed

speed_y

Background.speed_y: number

Get/Set the background vertical speed

Show raw api
{
    "functions": [],
    "properties": [
        {
            "name": "id",
            "desc": "Get/Set the background identifier (e.g. \"stars\")",
            "lua_type": "string",
            "source": {
                "line": 18,
                "path": "../../res/data/script/lib/system/background.lua"
            }
        },
        {
            "name": "pos",
            "desc": "Get/Set the background position (x/y)",
            "lua_type": "table",
            "source": {
                "line": 25,
                "path": "../../res/data/script/lib/system/background.lua"
            }
        },
        {
            "name": "x",
            "desc": "Get/Set the background horizontal position",
            "lua_type": "number",
            "source": {
                "line": 32,
                "path": "../../res/data/script/lib/system/background.lua"
            }
        },
        {
            "name": "y",
            "desc": "Get/Set the background vertical position",
            "lua_type": "number",
            "source": {
                "line": 39,
                "path": "../../res/data/script/lib/system/background.lua"
            }
        },
        {
            "name": "speed",
            "desc": "Get/Set the background speed (x/y)",
            "lua_type": "table",
            "source": {
                "line": 46,
                "path": "../../res/data/script/lib/system/background.lua"
            }
        },
        {
            "name": "speed_x",
            "desc": "Get/Set the background horizontal speed",
            "lua_type": "number",
            "source": {
                "line": 53,
                "path": "../../res/data/script/lib/system/background.lua"
            }
        },
        {
            "name": "speed_y",
            "desc": "Get/Set the background vertical speed",
            "lua_type": "number",
            "source": {
                "line": 60,
                "path": "../../res/data/script/lib/system/background.lua"
            }
        }
    ],
    "types": [],
    "name": "Background",
    "desc": "The background interface\n\n```lua\nBackground.id = \"stars\"\nBackground.speed = { x = 5.0, y = 3.0 }\n```",
    "source": {
        "line": 10,
        "path": "../../res/data/script/lib/system/background.lua"
    }
}