def update(context):
me = context.me
if info["flag"] == -1:
if context.me.y > context.get_env_height() / 2:
info["flag"] = 0 # 出生在左上角
else:
info["flag"] = 1 # 出生在右下角
time = context.step / 30
# 开局固定路径
if 0 < time < 0.15:
print(1)
return api.a2r(232) + math.pi * info["flag"]
elif 0.15 < time < 0.25:
return api.a2r(300) + math.pi * info["flag"]
elif 0.25 <= time < 0.40:
return api.a2r(90) + math.pi * info["flag"]
elif 0.4 <= time < 0.6:
return api.a2r(90) + math.pi * info["flag"]
elif 4 <= time < 4.1:
return api.a2r(50) + math.pi * info["flag"]
elif 8 < time < 8.2:
return api.a2r(45) + math.pi * info["flag"]
elif 12 < time < 12.3:
return api.a2r(180) + math.pi * info["flag"]
elif 14.5 < time < 14.8:
return api.a2r(225) + math.pi * info["flag"]
elif 21 <= time < 21.2:
print(21)
#return api.a2r(225) + math.pi * info["flag"]
打赏微信扫一扫,打赏作者吧~