Skip to content

Commit

Permalink
More API doc
Browse files Browse the repository at this point in the history
  • Loading branch information
tanis2000 committed Oct 20, 2023
1 parent cf2b55f commit 309e6de
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion assets/api/audio.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ function audio.load_sound(audio, filename) end
---@return AudioSound the sound
function audio.load_sound_from_assets(audio, filename) end

---@param audio Audio the audio system
---@param sound AudioSound the sound to play
function audio.play_sound(sound) end
function audio.play_sound(audio, sound) end

---@param sound AudioSound the sound to play
---@param volume number the volume 0..1
Expand Down
4 changes: 4 additions & 0 deletions assets/api/sprite.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,8 @@ function sprite.set_subtexture(sprite, subtexture) end
---@param y number the vertical position of the origin
function sprite.set_origin(sprite, x, y) end

---Destroy the sprite instance
---@param sprite Sprite the sprite instance
function sprite.destroy(sprite) end

return sprite
2 changes: 1 addition & 1 deletion assets/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function on_init()
io.write("sb: " .. tostring(sb) .. "\n")

-- Create a viewport that corresponds to the size of our render target
center = lkazmath.kmVec2New();
local center = lkazmath.kmVec2New();
center.x = const.DESIGN_WIDTH / 2;
center.y = const.DESIGN_HEIGHT / 2;
viewport = lkazmath.kmAABB2New();
Expand Down

0 comments on commit 309e6de

Please sign in to comment.