love.mouse.isDown (简体中文)
检测鼠标健按下,但并不检测鼠标滚轮滚动.鼠标滚轮在love.mousepressed调哦亲!
Contents
没有函数啦
吼吼 一个例程
down = love.mouse.isDown( button )
参数
MouseConstant button
- 按下健.
返回值
boolean down
- 指定鼠标是否按键.
函数}又一个?
Available since LÖVE 0.7.2 |
This variant is not supported in earlier versions. |
用法介绍
anyDown = love.mouse.isDown( button1, button2, button3, ... )
参数}怎么又是....
MouseConstant buttonN
- 一个健被按下.
返回值
boolean anyDown
- 按了就true,没按就false.
例子
按下右键使值+1.
val = 0
function love.update(dt)
if love.mouse.isDown("r") then
val = val + dt -- 按下右键时
end
end
顺便看看
- Mouse Constant / buttons
- love.mouse (简体中文)
- love.mousepressed
- love.mousereleased
- love.keyboard.isDown
多国语言
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