Views
love (简体中文)
The root module which contains all the other modules. Clearly the loveliest module of all. 这些包含了全部爱的基本模块.他们实在是忒可爱了~
When beginning to write games using LÖVE|当你开始用LÖVE写游戏, the most important parts of the API are the callbacks: love.load to do one-time setup of your game|接口里面最重要的几个函数就属love.load来执行一次初始游戏设定, love.update which is used to manage your game's state frame-to-frame|函数love.update用来管理你游戏框架之间的状态, and love.draw which is used to render the game state onto the screen|以及love.draw函数把你的游戏整到屏幕上供你XX~.
说白了就是你搞明白这3你就能开始闹腾了!
More interactive games will override additional callbacks in order to handle input from the user, and other aspects of a full-featured game.
为了处理玩家输入的信息以及呈现一个全方面体验的游戏,很多交互将会重写额外的回调函数.
LÖVE provides default placeholders for these callbacks, which you can override inside your own code, simply by specifying their fully qualified name:
LÖVE提供默认的placeholders?占位符?←这句翻译不算
在LÖVE中你可以通过用简写代替那些倒霉的全名来在你的代码中重新定义那些烦人的函数:
--你看这位仁兄用hamster就代替了后面那么老鼻子长的命令
hamster = love.graphics.newImage("hamster.png")
x = 50
y = 50
end
function love.draw()
--你看到了没他在这用的时候就不用写那么老长了
love.graphics.draw(hamster, x, y)
end
Modules|模块!少年!!还不点这!!!
| love.audio | Provides an interface to create noise with 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 the user's joystick. |
| love.keyboard | Provides an interface to the user's keyboard. |
| 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.thread | Allows you to work with threads. |
| love.timer | Provides an interface to your system's clock. |
Types |类型?介个我暂时还没研究过...
| Data | The superclass of all data. |
| Object | The superclass of all LÖVE types. |
Callbacks|回调函数们
| love.draw | Callback function used to draw on the screen every frame. |
| love.focus | Callback function triggered when window receives or loses focus. |
| love.joystickpressed | Called when a joystick button is pressed. |
| love.joystickreleased | Called when a joystick button is released. |
| 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.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.run | The main function, containing the main loop. A sensible default is used when left out. |
| love.update | Callback function used to update the state of the game every frame. |
Other Languages |其他语言~我看你除了E文的还能看懂26个字母以外还能看懂哪国语言~
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