用户:
爵士OIer查看:0 回复:2 评论:0 创建时间:2018-07-25T20:31:26
运行不了:
import Codemao
塔1 = 1
塔2 = 1
塔3 = 1
塔4 = 1
def when_start():
Codemao.change_shape_by_index(2)
Codemao.set_rotation_type('disable')
Codemao.set_xy(random.randint(-200, 200), 500)
while True :
Codemao.add_y(-2)
if (Codemao.value_of_distance_to('新角色(1)') <= 300) :
while not Codemao.is_touched('Self', '新角色(1)') :
Codemao.face_to('新角色(1)')
Codemao.move_forward(2)
塔1 = 0
Codemao.wait_for_sec(0.3333333333333333)
Codemao.change_shape_by_index(1)
Codemao.wait_for_sec(0.3333333333333333)
Codemao.change_shape_by_index(2)
Codemao.wait_for_sec(0.3333333333333333)
if (Codemao.value_of_distance_to('新角色(2)') <= 300) :
while not Codemao.is_touched('Self', '新角色(2)') :
Codemao.face_to('新角色(2)')
Codemao.move_forward(2)
Codemao.wait_for_sec(0.3333333333333333)
Codemao.change_shape_by_index(1)
Codemao.wait_for_sec(0.3333333333333333)
Codemao.change_shape_by_index(2)
Codemao.wait_for_sec(0.3333333333333333)
塔2 = 0
Codemao.add_y(-2)
if (Codemao.value_of_distance_to('新角色(3)') <= 300) :
while not Codemao.is_touched('Self', '新角色(3)') :
Codemao.face_to('新角色(3)')
Codemao.move_forward(2)
塔3 = 0
Codemao.wait_for_sec(0.3333333333333333)
Codemao.change_shape_by_index(1)
Codemao.wait_for_sec(0.3333333333333333)
Codemao.change_shape_by_index(2)
Codemao.wait_for_sec(0.3333333333333333)
if (Codemao.value_of_distance_to('新角色(4)') <= 300) :
while not Codemao.is_touched('Self', '新角色(4)') :
Codemao.face_to('新角色(4)')
Codemao.move_forward(2)
塔4 = 0
Codemao.wait_for_sec(0.3333333333333333)
Codemao.change_shape_by_index(1)
Codemao.wait_for_sec(0.3333333333333333)
Codemao.change_shape_by_index(2)
Codemao.wait_for_sec(0
以及:
import Codemao
塔1 = 1
塔2 = 1
塔3 = 1
塔4 = 1
def when_clicked():
while True :
Codemao.move_to('mouse_pointer')
if Codemao.is_mouse_down() :
while True :
if Codemao.is_touched('Self', '新角色(5)') :
Codemao.hide()
if Codemao.is_touched('Self', '新角色(6)') :
Codemao.hide()
if Codemao.is_touched('Self', '新角色(7)') :
Codemao.hide()
if Codemao.is_touched('Self', '新角色(8)') :
Codemao.hide()
if Codemao.is_touched('Self', '新角色(9)') :
Codemao.hide()
if Codemao.is_touched('Self', '新角色(10)') :
Codemao.hide()
if Codemao.is_touched('Self', '新角色(11)') :
Codemao.hide()
if Codemao.is_touched('Self', '新角色(12)') :
Codemao.hide()