Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
addon:thutconcrete:elevator:zh [2022/11/24 00:59]
fight_xing [目录]
addon:thutconcrete:elevator:zh [2023/10/24 04:43]
hfsr [Component: Elevator]
Line 1: Line 1:
-Component: Elevator+组件:电梯
 ================= =================
 +将电梯控制模块连接到电脑即可访问此组件。
  
-**本篇文章的部分/​全部内容还没有翻译完毕**+组件名:`elevator`。
  
-This component can be accessed by connecting an Elevator Control to a Computer. +回调函数:
- +
-Component name: `elevator`. ​  +
-Callbacks:+
  
 - `call(floor:​number):​boolean`  ​ - `call(floor:​number):​boolean`  ​
-  ​Tries to call the elevator to a certain floor. Returns ​`true` ​on success, ​`false` ​and an error message otherwise.+  ​尝试将电梯呼叫到某一层。若成功返回 ​`true` ​,若失败返回 ​`false` ​与报错信息。
 - `isReady():​boolean`  ​ - `isReady():​boolean`  ​
-  ​Returns ​`true` ​if the elevator can be called, ​`false` ​if it can not (because it is already moving).+  ​若电梯可以被呼叫则返回 ​`true`,若不能被呼叫(因为正在移动)则返回 ​`false`
 - `getLocalFloor():​number`  ​ - `getLocalFloor():​number`  ​
-  ​Returns the number of the floor the currently accessed Elevator Control is set to.+  ​返回当前电梯控制器设定的总楼层数。
 - `getElevatorFloor():​number`  ​ - `getElevatorFloor():​number`  ​
-  ​Returns the number of the floor the elevator is currently at. If the elevator is moving, the function returns the destination floor as its second argument.+  ​返回电梯当前所在的楼层。若电梯正在移动,则此函数会将目标楼层作为第二个返回值。
 - `doesFloorExist(floor:​number):​boolean`  ​ - `doesFloorExist(floor:​number):​boolean`  ​
-  ​Returns ​`true` ​if the floor exists and thus can be called; the function returns ​`false` ​if the floor does not exist.+  ​若给定楼层存在,因此也可以呼叫,则返回 ​`true`。若楼层不存在则函数会返回 ​`false`
  
 目录 目录