Skip to content

Commit dc6c66c

Browse files
committed
Merge branch 'dev' of https://github.com/SkyUOI/Zenith into dev
2 parents b94e9a5 + 2d50d3e commit dc6c66c

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

scripts/bullets/enchanted_beam.gd

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,27 @@ func start():
1616
$Start.start()
1717

1818

19+
# 是否攻击过player
20+
var is_bound = false
21+
22+
1923
# Called every frame. 'delta' is the elapsed time since the previous frame.
2024
func _process(delta):
21-
position += delta * speed * direction * (1.0 if $Start.time_left == 0 else (1.0 / 6.0))
25+
# 没用过正常移动
26+
if !is_bound:
27+
position += delta * speed * direction * (1.0 if $Start.time_left == 0 else (1.0 / 6.0))
28+
else:
29+
position -= delta * speed * direction
2230

2331

2432
func _on_out_screen_screen_exited():
2533
queue_free()
2634

2735

2836
func _on_area_entered(area):
37+
# 防止重复伤害
2938
if area.name == "Player":
3039
area.get_node("..").hit(10)
40+
$CollisionShape2D.set_deferred("disabled", true)
41+
#elif area.name == 盾
42+
#is_bound = true

scripts/weapons/enchanted_sword.gd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ func exit():
6262
func nextOper():
6363
oper_num += 1
6464
if oper_num >= opers.size():
65+
attack_finished.emit()
6566
return
6667
opers[oper_num].call()
6768

0 commit comments

Comments
 (0)