invaders: add luadoc comments
this commit adds luadoc comments right before invaders.run() so that all its parameters are explained in luadoc.
This commit is contained in:
parent
c846da24e1
commit
7041a4680d
|
@ -450,6 +450,12 @@ function game.highscore (score)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Run Awesome Invaders
|
||||||
|
-- @param args A table with parameters.
|
||||||
|
-- x the X coordinate of the playing field.
|
||||||
|
-- y the Y coordinate of the playing field.
|
||||||
|
-- if either of these is left out, the game is placed in the center of the focused screen.
|
||||||
|
-- solidbg the background color of the playing field. If none is given, the playing field is transparent.
|
||||||
function run(args)
|
function run(args)
|
||||||
gamedata.screen = capi.screen[capi.mouse.screen]
|
gamedata.screen = capi.screen[capi.mouse.screen]
|
||||||
gamedata.field.x = gamedata.screen.geometry.x + math.floor((gamedata.screen.geometry.width - gamedata.field.w) / 2)
|
gamedata.field.x = gamedata.screen.geometry.x + math.floor((gamedata.screen.geometry.width - gamedata.field.w) / 2)
|
||||||
|
|
Loading…
Reference in New Issue