Views
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:
hrcak = love.graphics.newImage("hrcak.png")
x = 50
y = 50
end
function love.draw()
love.graphics.draw(hrcak, x, y)
end
Modules
love.audio | Provides an interface to output sound to the user's speakers. |
love.event | Manages events, like keypresses. |
love.filesystem | Provides an interface to the user's filesystem. |
love.font | Allows you to work with fonts. |
love.graphics | Drawing of shapes and images, management of screen geometry. |
love.image | Provides an interface to decode encoded image data. |
love.joystick | Provides an interface to connected joysticks. |
love.keyboard | Provides an interface to the user's keyboard. |
love.math | Provides system-independent mathematical functions. |
love.mouse | Provides an interface to the user's mouse. |
love.physics | Can simulate 2D rigid body physics in a realistic manner. |
love.sound | This module is responsible for decoding sound files. |
love.system | Provides access to information about the user's system. |
love.thread | Allows you to work with threads. |
love.timer | Provides an interface to your system's clock. |
love.window | Provides an interface for the program's window. |
Types
Data | The superclass of all data. |
Object | The superclass of all LÖVE types. |
Callbacks
Config Files | Game configuration settings. |
love.draw | Callback function used to draw on the screen every frame. |
love.errhand | The error handler, used to display error messages. |
love.focus | Callback function triggered when window receives or loses focus. |
love.gamepadaxis | Called when a Joystick's virtual gamepad axis is moved. |
love.gamepadpressed | Called when a Joystick's virtual gamepad button is pressed. |
love.gamepadreleased | Called when a Joystick's virtual gamepad button is released. |
love.joystickadded | Called when a Joystick is connected. |
love.joystickaxis | Called when a joystick axis moves. |
love.joystickhat | Called when a joystick hat direction changes. |
love.joystickpressed | Called when a joystick button is pressed. |
love.joystickreleased | Called when a joystick button is released. |
love.joystickremoved | Called when a Joystick is disconnected. |
love.keypressed | Callback function triggered when a key is pressed. |
love.keyreleased | Callback function triggered when a key is released. |
love.load | This function is called exactly once at the beginning of the game. |
love.mousefocus | Callback function triggered when window receives or loses mouse focus. |
love.mousepressed | Callback function triggered when a mouse button is pressed. |
love.mousereleased | Callback function triggered when a mouse button is released. |
love.quit | Callback function triggered when the game is closed. |
love.resize | Called when the window is resized. |
love.run | The main function, containing the main loop. A sensible default is used when left out. |
love.textinput | Called when text has been entered by the user. |
love.threaderror | Callback function triggered when a Thread encounters an error. |
love.update | Callback function used to update the state of the game every frame. |
love.visible | Callback function triggered when window is shown or hidden. |
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info