love (Српски)

Korenji modul koji sadrži sve ostale module. Očigledno najljepši modul od svih.

Kada počinjete da pišete igre koristeći LÖVE, najvažniji djelovi API-ja su callbacks (povratni pozivi): love.load da uradite početna podešavanja vaše igre, love.update kojie je korišten da menadžeruje status vaše iggre od jednog frame-a (sličice) do drugog, i love.draw koji se koristi da renderuje status vaše igre na ekran.

Igre koje su više interaktivne prepisat će ove povratne pozive na taj način da parsiraju ulazne podatke od korisnika, kao i drugih aspekata igre.

LÖVE već ima predoređenje funkcije za ove povratne pozive koje možete koristiti u vašem kodu, jednostavno speicificirajući puno ime:

function love.load()
   hrcak = love.graphics.newImage("hrcak.png")
   x = 50
   y = 50
end
function love.draw()
   love.graphics.draw(hrcak, x, y)
end

Modules

love.audioProvides an interface to output sound to the user's speakers.
love.eventManages events, like keypresses.
love.filesystemProvides an interface to the user's filesystem.
love.fontAllows you to work with fonts.
love.graphicsDrawing of shapes and images, management of screen geometry.
love.imageProvides an interface to decode encoded image data.
love.joystickProvides an interface to connected joysticks.
love.keyboardProvides an interface to the user's keyboard.
love.mathProvides system-independent mathematical functions.
love.mouseProvides an interface to the user's mouse.
love.physicsCan simulate 2D rigid body physics in a realistic manner.
love.soundThis module is responsible for decoding sound files.
love.systemProvides access to information about the user's system.
love.threadAllows you to work with threads.
love.timerProvides high-resolution timing functionality.
love.touchProvides an interface to touch-screen presses.
love.videoThis module is responsible for decoding and streaming video files.
love.windowProvides an interface for the program's window.

Types

DataThe superclass of all data.
ObjectThe superclass of all LÖVE types.

Callbacks

Config FilesGame configuration settings.
love.directorydroppedCallback function triggered when a directory is dragged and dropped onto the window.
love.drawCallback function used to draw on the screen every frame.
love.errhandThe error handler, used to display error messages.
love.filedroppedCallback function triggered when a file is dragged and dropped onto the window.
love.focusCallback function triggered when window receives or loses focus.
love.gamepadaxisCalled when a Joystick's virtual gamepad axis is moved.
love.gamepadpressedCalled when a Joystick's virtual gamepad button is pressed.
love.gamepadreleasedCalled when a Joystick's virtual gamepad button is released.
love.joystickaddedCalled when a Joystick is connected.
love.joystickaxisCalled when a joystick axis moves.
love.joystickhatCalled when a joystick hat direction changes.
love.joystickpressedCalled when a joystick button is pressed.
love.joystickreleasedCalled when a joystick button is released.
love.joystickremovedCalled when a Joystick is disconnected.
love.keypressedCallback function triggered when a key is pressed.
love.keyreleasedCallback function triggered when a keyboard key is released.
love.loadThis function is called exactly once at the beginning of the game.
love.lowmemoryCallback function triggered when the system is running out of memory on mobile devices.
love.mousefocusCallback function triggered when window receives or loses mouse focus.
love.mousemovedCallback function triggered when the mouse is moved.
love.mousepressedCallback function triggered when a mouse button is pressed.
love.mousereleasedCallback function triggered when a mouse button is released.
love.quitCallback function triggered when the game is closed.
love.resizeCalled when the window is resized.
love.runThe main function, containing the main loop. A sensible default is used when left out.
love.texteditedCalled when the candidate text for an IME has changed.
love.textinputCalled when text has been entered by the user.
love.threaderrorCallback function triggered when a Thread encounters an error.
love.touchmovedCallback function triggered when a touch press moves inside the touch screen.
love.touchpressedCallback function triggered when the touch screen is touched.
love.touchreleasedCallback function triggered when the touch screen stops being touched.
love.updateCallback function used to update the state of the game every frame.
love.visibleCallback function triggered when window is shown or hidden.
love.wheelmovedCallback function triggered when the mouse wheel is moved.


Other Languages