表情符号#
介绍#
VEX AIM 编程机器人可以在屏幕上显示表情符号。表情符号可以用来表示机器人的情绪、显示状态,或者在项目运行时提供反馈。
Only one emoji can be shown at a time. A new show_emoji method replaces the emoji currently shown on the screen. Use hide_emoji to clear the emoji from the screen.
以下是所有方法的列表:
操作——显示或隐藏表情符号。
show_emoji— Displays an emoji on the robot’s screen.hide_emoji— Clears the emoji from the screen.
行动#
show_emoji#
show_emoji displays an emoji on the robot’s screen. The emoji appears over any text or drawn images on the screen.
Usage:
robot.screen.show_emoji(emoji, direction)
范围 |
描述 |
|---|---|
|
要显示的表情符号。请参见下方的表情符号选项。 |
|
Optional. The direction the emoji faces on the screen:
|
|
|
|
|
|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
示例
# Show two different emotions
robot.screen.show_emoji(CONFIDENT)
wait(2, SECONDS)
robot.screen.show_emoji(FRUSTRATED)
# Show one emoji facing different directions
robot.screen.show_emoji(EXCITED, LOOK_LEFT)
wait(2, SECONDS)
robot.screen.show_emoji(EXCITED, LOOK_FORWARD)
wait(2, SECONDS)
robot.screen.show_emoji(EXCITED, LOOK_RIGHT)
hide_emoji#
hide_emoji clears the emoji from the robot’s screen.
Usage:
robot.screen.hide_emoji()
参数 |
描述 |
|---|---|
该方法没有参数。 |
例子
# Show an emoji for 2 seconds
robot.screen.show_emoji(THINKING)
wait(2, SECONDS)
robot.screen.hide_emoji()



































