← 수업 제작 도구
홈 › Components › Action Button (행동 버튼) › 화면 4

화면 4. Action Button.pressCount [source]

원본: Computation Layer 문서(Action Button (행동 버튼)) · Try It (원본 화면)

화면 번호4 / 12
문서 항목 설명 (원문)pressCount Gets the number of times the action button has been pressed.

1. 화면 캡처 (빨간 번호 = 아래 표의 번호)

화면 4 캡처

화면에 적힌 영어 문구(원문):

2. CL이 입력된 곳

코드 안의 회색 줄은 원문 영어 주석이고, 파란 줄은 그 영어 주석의 번역이며, 연분홍 줄은 코드가 하는 일의 설명이다.

번호이름종류CL 코드 원문, 번역, 설명
1레이블 없는 그래프그래프
# This number sink looks for an action button named "liftoff"
# and then sources the number of times it was pressed and
# then assigns it to "a" in the graph component.
▷ 이 number sink는 "liftoff"라는 행동 버튼을 찾아 그 버튼이 눌린 횟수를 가져온 뒤 그래프 구성요소의 "a"에 정한다.

number("a"): liftoff.pressCount
▶ 그래프의 변수 a는 liftoff 버튼이 눌린 횟수(liftoff.pressCount)로 한다.
number("이름")은 그래핑 계산기 안의 변수 값을 정하고, pressCount는 행동 버튼이 눌린 횟수를 알려 준다.
# Open the graph component to see how we used "a" to # make a pyramid. ▷ "a"를 어떻게 써서 피라미드를 만들었는지는 그래프 구성요소를 열어 보라.