Difference between revisions of "love.draw (简体中文)"
(Created page with "用来在每一帧绘制画面的回调函数 == 函数 == === 简介 === <source lang="lua"> love.draw( ) </source> === 参数 === 无. === 返回 === 无. == 范例 == 绘制...") |
m (Fixed parent) |
||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | + | 用来在每一帧渲染画面的回调函数. | |
== 函数 == | == 函数 == | ||
=== 简介 === | === 简介 === | ||
Line 10: | Line 10: | ||
无. | 无. | ||
== 范例 == | == 范例 == | ||
− | 绘制一个在[[love.load]]函数内被加载的图像( | + | 绘制一个在[[love.load]]函数内被加载的图像(最好别把[[love.graphics.newImage]]放在love.draw里,这样会导致图像在每一帧都被加载一次). |
<source lang="lua"> | <source lang="lua"> | ||
function love.load() | function love.load() | ||
Line 22: | Line 22: | ||
</source> | </source> | ||
== 参考 == | == 参考 == | ||
− | * [[parent::love]] | + | * [[parent::love (简体中文)]] |
[[Category:Callbacks]] | [[Category:Callbacks]] | ||
− | {{#set:Description= | + | {{#set:Description=用来在每一帧渲染画面的回调函数.}} |
{{#set:Since=000}} | {{#set:Since=000}} | ||
== 其他语言 == | == 其他语言 == | ||
{{i18n|love.draw}} | {{i18n|love.draw}} |
Latest revision as of 15:25, 23 August 2013
用来在每一帧渲染画面的回调函数.
函数
简介
love.draw( )
参数
无.
返回
无.
范例
绘制一个在love.load函数内被加载的图像(最好别把love.graphics.newImage放在love.draw里,这样会导致图像在每一帧都被加载一次).
function love.load()
hamster = love.graphics.newImage("hamster.png")
x = 50
y = 50
end
function love.draw()
love.graphics.draw(hamster, x, y)
end
参考
其他语言
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