Drawing text
function love.draw()
love.graphics.print("Hello World!", 400, 300)
end
Drawing an image
function love.load()
whale = love.graphics.newImage("whale.png")
end
function love.draw()
love.graphics.draw(whale, 300, 200)
end
Playing a sound
function love.load()
sound = love.audio.newSource("music.ogg", "stream")
love.audio.play(sound)
end
Last modified 16 December 2024