10.3 Utility - Counter 計數(shù)器


Create a counter that starts at 0 and can be incremented, decremented or set to a specific value. The counter is:

  • incremented by one when the Increase port receives a pulse速挑;
  • decremented by one when the Decrement port receives a pulse;
  • set to the value specified by the Jump to Number port when the Jump port receives a pulse.

創(chuàng)建一個從0開始的計數(shù)器院仿,可以遞增失驶、遞減或設(shè)置為特定值。
計數(shù)器是 :

  • 當(dāng) Increase 遞增 接口接收到值時遞增1驶俊;
  • 當(dāng) Decrement 遞減 接口接收到值時遞減1娶耍;
  • 當(dāng) Jump to Number 跳轉(zhuǎn) 接口接收到值時,跳轉(zhuǎn)到接口設(shè)置的值饼酿。

Constrain the counter by specifying a value in the Maximum Count port. If the counter is incremented after it reaches this maximum value, it will reset to zero. Decrementing the counter from its initial value will wrap it backwards to the maximum value. If the counter is constrained, the "Jump to Number" value must fall within bounds, otherwise the counter will return to the starting value.
Often used to track a sequential state (ex: an onboarding flow) interchangeably with Option Switch. See State Basics for more information.

輸入口

Increase 遞增
A pulse that increases the counter value by 1.
接收到值時榕酒,計數(shù)器的值加1胚膊。

Decrease 遞減
A pulse that decreases the counter value by 1.
接收到值時,計數(shù)器的值減1想鹰。

Jump 跳轉(zhuǎn)
A pulse that resets the counter to the value specified by the Jump to Number port.
接收到值時紊婉,將計數(shù)器跳轉(zhuǎn)到 Jump to Number 設(shè)置的值。

Jump to Number 跳轉(zhuǎn)到的數(shù)字
The number to use as the counter value when the Jump port is pulsed.
設(shè)置 Jump 接口接收到值時要跳轉(zhuǎn)到的數(shù)字辑舷。

Maximum Count 最大計量
The maximum counter value. The counter will reset to zero when the maximum value is reached. Note that the counter will always remain less than this value.
值的最大計數(shù)器喻犁。當(dāng)達到最大值時,計數(shù)器將復(fù)位為零何缓。計數(shù)器將始終保持小于此值肢础。

輸出口

Number 數(shù)字
The current value of the counter (ex: 0, 1, 2...)
計數(shù)器的當(dāng)前值(例:0,1碌廓,2 ...)


Related Patches 相關(guān)模塊

Switch传轰,Option Switch


Related Examples 案例

Instagram Adjust
Use drag to control the Instagram straighten tool.


最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市氓皱,隨后出現(xiàn)的幾起案子路召,更是在濱河造成了極大的恐慌,老刑警劉巖波材,帶你破解...
    沈念sama閱讀 216,372評論 6 498
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件股淡,死亡現(xiàn)場離奇詭異,居然都是意外死亡廷区,警方通過查閱死者的電腦和手機唯灵,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,368評論 3 392
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來隙轻,“玉大人埠帕,你說我怎么就攤上這事【谅蹋” “怎么了敛瓷?”我有些...
    開封第一講書人閱讀 162,415評論 0 353
  • 文/不壞的土叔 我叫張陵,是天一觀的道長斑匪。 經(jīng)常有香客問我呐籽,道長,這世上最難降的妖魔是什么蚀瘸? 我笑而不...
    開封第一講書人閱讀 58,157評論 1 292
  • 正文 為了忘掉前任狡蝶,我火速辦了婚禮,結(jié)果婚禮上贮勃,老公的妹妹穿的比我還像新娘贪惹。我一直安慰自己,他們只是感情好寂嘉,可當(dāng)我...
    茶點故事閱讀 67,171評論 6 388
  • 文/花漫 我一把揭開白布奏瞬。 她就那樣靜靜地躺著枫绅,像睡著了一般。 火紅的嫁衣襯著肌膚如雪丝格。 梳的紋絲不亂的頭發(fā)上撑瞧,一...
    開封第一講書人閱讀 51,125評論 1 297
  • 那天棵譬,我揣著相機與錄音显蝌,去河邊找鬼。 笑死订咸,一個胖子當(dāng)著我的面吹牛曼尊,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播脏嚷,決...
    沈念sama閱讀 40,028評論 3 417
  • 文/蒼蘭香墨 我猛地睜開眼骆撇,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了父叙?” 一聲冷哼從身側(cè)響起神郊,我...
    開封第一講書人閱讀 38,887評論 0 274
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎趾唱,沒想到半個月后涌乳,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,310評論 1 310
  • 正文 獨居荒郊野嶺守林人離奇死亡甜癞,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,533評論 2 332
  • 正文 我和宋清朗相戀三年夕晓,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片悠咱。...
    茶點故事閱讀 39,690評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡蒸辆,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出析既,到底是詐尸還是另有隱情躬贡,我是刑警寧澤,帶...
    沈念sama閱讀 35,411評論 5 343
  • 正文 年R本政府宣布眼坏,位于F島的核電站拂玻,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏空骚。R本人自食惡果不足惜纺讲,卻給世界環(huán)境...
    茶點故事閱讀 41,004評論 3 325
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望囤屹。 院中可真熱鬧熬甚,春花似錦、人聲如沸肋坚。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,659評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至诲泌,卻和暖如春盲赊,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背敷扫。 一陣腳步聲響...
    開封第一講書人閱讀 32,812評論 1 268
  • 我被黑心中介騙來泰國打工哀蘑, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人葵第。 一個月前我還...
    沈念sama閱讀 47,693評論 2 368
  • 正文 我出身青樓绘迁,卻偏偏與公主長得像,于是被迫代替她去往敵國和親卒密。 傳聞我的和親對象是個殘疾皇子缀台,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 44,577評論 2 353

推薦閱讀更多精彩內(nèi)容