miaowm5 / RMMV-F1

RPG Maker MV 帮助文档汉化
http://miaowm5.github.io/RMMV-F1/
240 stars 52 forks source link

03_04.html(Input Class) #25

Closed miaowm5 closed 8 years ago

miaowm5 commented 8 years ago

The interval of the key repeat in frames. (待议)重复按键在一帧中的持续时间。

The wait time of the key repeat in frames. (待议)重复按键在一帧中的等待时间。

虽然能够理解意思,但是却不知道怎么翻译成中文比较合适……

RyanBernX commented 8 years ago

'in frames'的含义应该是'以帧为单位'吧(如果能测试一下此函数的效果就能确定了)

winkidney commented 8 years ago

按键间隔时间,in frames,帧之间,感觉这样比较合适

miaowm5 commented 8 years ago

一个是 interval ,一个是 wait time ,两个都是处理按键间隔的,怎么区分开来 @winkidney

winkidney commented 8 years ago

求一下上下文:)

taroxd commented 8 years ago

in frames: 以帧为单位

我觉得你这个短语就理解错了吧- -

miaowm5 commented 8 years ago

https://github.com/miaowm5/RMMV-F1/blob/0b6e6244f7f4336b0194a02ebeb6fdc34c1aba13/page/03_04.html @winkidney 最后部分

taroxd commented 8 years ago

The wait time of the key repeat in frames. 多少帧后开始算作重复按键。

The interval of the key repeat in frames. 每两次重复按键之间间隔多少帧。

miaowm5 commented 8 years ago

…………两种说法之间有什么区别

@taroxd

taroxd commented 8 years ago

keyRepeatWait = 24, keyRepeatInterval = 6 的话

按住一个键的第 1 帧,第 24 帧,第 30 帧,第 36 帧,... 会判定 isRepeated 返回 true。

我表达能力也有限,你自己表达一下这个意思吧

winkidney commented 8 years ago

是两次按键的间隔吧?比如keyRepeatInterval = 6 ,那么6帧之内的两次按键会被认为是重复按键?

winkidney commented 8 years ago

wait time是这次重复可以在接下来多少帧被检测到? 这个API我不太熟,不知道有源码可以看没

miaowm5 commented 8 years ago

果然还是得回去看源代码……

TouchInput.isRepeated = function() { return (this.isPressed() && (this._triggered || (this._pressedTime >= this.keyRepeatWait && this._pressedTime % this.keyRepeatInterval === 0))) }; TouchInput.isLongPressed = function() { return this.isPressed() && this._pressedTime >= this.keyRepeatWait };

原来是用来判定新追加的长按功能的 =口=

RyanBernX commented 8 years ago

repeat的含义要弄清楚。实际的repeat并不是指多次按下按键。而是指按住按键不放的时候,间隔多少帧就算重复按下。如果使用press则反应时间太短,如果使用trigger则只有一次有效果。@winkidney

taroxd commented 8 years ago

@winkidney 有源码 在 rpg_core.js 里面

这个不是检测重复按键的,而是把长按按键当做重复的。就和 VA 的 Input.repeat? 一样

而且我自己也实现过,知道那个 6 和 24 是什么意思:http://taroxd.github.io/rgss/%E5%85%A8%E9%94%AE%E7%9B%98%E8%84%9A%E6%9C%AC.html (就是下面那个 self.repeat? 里的 6 和 23。其中大于号改成大于等于就是 24 了)

不要问我为什么我会知道是6和24这两个数

winkidney commented 8 years ago

taroxd commented 8 years ago

@miaowm5 长按功能哪里是新追加的…… VA 里的 Input.repeat? 不就是吗?

miaowm5 commented 8 years ago

Input.isLongPressed Input.isRepeated @taroxd

taroxd commented 8 years ago

哦 了解。但没啥影响

miaowm5 commented 8 years ago

keyRepeatInterval The interval of the key repeat in frames. 重复按键的判定间隔帧数

keyRepeatWait The wait time of the key repeat in frames. 按键长按的判定间隔帧数。

喵的感觉还是不会翻啊

taroxd commented 8 years ago

keyRepeatWait 并不只是长按里用到啊,isRepeated 里面也用到了

taroxd commented 8 years ago

keyRepeatInterval 进入重复按键(长按)状态之后,两次重复按键之间间隔的帧数

keyRepeatWait 开始进入重复按键(长按)状态之前等待的帧数

喵的感觉还是不会翻啊 喵的谁会去改这俩数啊 喵的还好我没入坑F1的翻译

miaowm5 commented 8 years ago

keyRepeatInterval The interval of the key repeat in frames. 重复按键的判定间隔帧数

keyRepeatWait The wait time of the key repeat in frames. 一次按键的持续时间

…………这不是和原版意思完全反过来了吗

winkidney commented 8 years ago

keyRepeatInterval 重复按键的判定间隔帧数(isRepeated,isLongPressed触发的间隔帧数)

keyRepeatWait isLongPressed触发最小持续帧数

喵的感觉还是不会翻啊 喵的谁会去改这俩数啊

winkidney commented 8 years ago

第一个是触发间隔,第二个是按键持续时间检测

miaowm5 commented 8 years ago

所以大概后面那个翻译成 一次按键的持续时间 应该最准确了?

taroxd commented 8 years ago

一次按键的持续时间 不就是1帧吗 歧义很大的(

例子在这条 https://github.com/miaowm5/RMMV-F1/issues/25#issuecomment-150883118

winkidney commented 8 years ago

@taroxd 不是吧?只是每帧推送这个事件,然后每帧都按了,就叫做持续按键吧?

taroxd commented 8 years ago

是的,一般你也不会松开按键后下一帧立刻再按上去……

miaowm5 commented 8 years ago

一次按下按键的持续时间?

taroxd commented 8 years ago

keyRepeatWait = 24, keyRepeatInterval = 6 的话

按住一个键的第 1 帧,第 24 帧,第 30 帧,第 36 帧,... 会判定 isRepeated 返回 true。 按住一个键的第 1 帧,第 24 帧,第 25 帧,第 26 帧,... 会判定 isLongPressed 返回 true。

taroxd commented 8 years ago

进入长按状态前的等待时间 我觉得这个挺准确啊

winkidney commented 8 years ago

keyRepeatInterval 重复按键状态更新间隔时间(帧) keyRepeatWait 进入长按状态前的等待时间(帧)

miaowm5 commented 8 years ago

好的,不管了 没异议就用最后这个了 ˋ△ˊ