1.打开机甲大师robomasterAPP
2.点击实验室
3.创建程序
4.把这些代码复制进去:
variable_cishu = 0
def user_defined_new_func3():
global variable_cishu
media_ctrl.play_sound(rm_define.media_sound_recognize_success,wait_for_complete_flag=True)
led_ctrl.set_bottom_led(rm_define.armor_bottom_all, 0, 127, 70, rm_define.effect_breath)
led_ctrl.set_top_led(rm_define.armor_top_all, 161, 255, 69, rm_define.effect_marquee)
while True:
pass
def user_defined_new_func2():
global variable_cishu
gimbal_ctrl.suspend()
led_ctrl.turn_off(rm_define.armor_all)
media_ctrl.play_sound(rm_define.media_sound_attacked,wait_for_complete_flag=True)
armor_ctrl.cond_wait(rm_define.cond_armor_hit)
gimbal_ctrl.resume()
led_ctrl.set_bottom_led(rm_define.armor_bottom_all, 69, 215, 255, rm_define.effect_always_on)
led_ctrl.set_top_led(rm_define.armor_top_all, 69, 215, 255, rm_define.effect_always_on)
def user_defined_new_func1():
global variable_cishu
while not 10 < tools.run_time_of_program():
armor_ctrl.cond_wait(rm_define.cond_armor_hit)
variable_cishu = variable_cishu + 1
media_ctrl.play_sound(rm_define.media_sound_solmization_1C)
led_ctrl.set_top_led(rm_define.armor_top_all, 255, 50, 0, rm_define.effect_always_on)
led_ctrl.set_top_led(rm_define.armor_top_all, 255, 50, 0, rm_define.effect_always_off)
media_ctrl.play_sound(rm_define.media_sound_shoot,wait_for_complete_flag=True)
if 20 < variable_cishu:
user_defined_new_func3()
else:
user_defined_new_func2()
def start():
global variable_cishu
variable_cishu = 0
armor_ctrl.set_hit_sensitivity(10)
media_ctrl.play_sound(rm_define.media_sound_count_down,wait_for_complete_flag=True)
user_defined_new_func1()
5.点击开始运行即可开始游戏...
6.你的成功会影响你智能车的...
7.倒计时开始几秒后将要开始...
8.游戏开始后,
以宇宙第速!
拍打装甲板,
你只有10秒。
来完成你的挑战,
如果能在10秒内。
拍打装甲板20次,
你就能挑战成功!
系统会提示胜利,
并给予相应奖励。
如果你未能成功,
那么你就............?!@¥%6^&(8);j k**jlhf啊?:’‘’【】a,s!!
感谢观看
顺便给个游戏评价哈!
顺便给个游戏评价哈!顺便给个游戏评价哈!
顺便给个游戏评价哈!顺便给个游戏评价哈!顺便给个游戏评价哈!
2.点击实验室
3.创建程序
4.把这些代码复制进去:
variable_cishu = 0
def user_defined_new_func3():
global variable_cishu
media_ctrl.play_sound(rm_define.media_sound_recognize_success,wait_for_complete_flag=True)
led_ctrl.set_bottom_led(rm_define.armor_bottom_all, 0, 127, 70, rm_define.effect_breath)
led_ctrl.set_top_led(rm_define.armor_top_all, 161, 255, 69, rm_define.effect_marquee)
while True:
pass
def user_defined_new_func2():
global variable_cishu
gimbal_ctrl.suspend()
led_ctrl.turn_off(rm_define.armor_all)
media_ctrl.play_sound(rm_define.media_sound_attacked,wait_for_complete_flag=True)
armor_ctrl.cond_wait(rm_define.cond_armor_hit)
gimbal_ctrl.resume()
led_ctrl.set_bottom_led(rm_define.armor_bottom_all, 69, 215, 255, rm_define.effect_always_on)
led_ctrl.set_top_led(rm_define.armor_top_all, 69, 215, 255, rm_define.effect_always_on)
def user_defined_new_func1():
global variable_cishu
while not 10 < tools.run_time_of_program():
armor_ctrl.cond_wait(rm_define.cond_armor_hit)
variable_cishu = variable_cishu + 1
media_ctrl.play_sound(rm_define.media_sound_solmization_1C)
led_ctrl.set_top_led(rm_define.armor_top_all, 255, 50, 0, rm_define.effect_always_on)
led_ctrl.set_top_led(rm_define.armor_top_all, 255, 50, 0, rm_define.effect_always_off)
media_ctrl.play_sound(rm_define.media_sound_shoot,wait_for_complete_flag=True)
if 20 < variable_cishu:
user_defined_new_func3()
else:
user_defined_new_func2()
def start():
global variable_cishu
variable_cishu = 0
armor_ctrl.set_hit_sensitivity(10)
media_ctrl.play_sound(rm_define.media_sound_count_down,wait_for_complete_flag=True)
user_defined_new_func1()
5.点击开始运行即可开始游戏...
6.你的成功会影响你智能车的...
7.倒计时开始几秒后将要开始...
8.游戏开始后,
以宇宙第速!
拍打装甲板,
你只有10秒。
来完成你的挑战,
如果能在10秒内。
拍打装甲板20次,
你就能挑战成功!
系统会提示胜利,
并给予相应奖励。
如果你未能成功,
那么你就............?!@¥%6^&(8);j k**jlhf啊?:’‘’【】a,s!!
感谢观看
顺便给个游戏评价哈!
顺便给个游戏评价哈!顺便给个游戏评价哈!
顺便给个游戏评价哈!顺便给个游戏评价哈!顺便给个游戏评价哈!