Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -51,8 +51,11 @@ func _activate(_world, activator, position):
|
||||
assert(false, "who are you, activator?")
|
||||
# world.add_child(katana)
|
||||
|
||||
func discard(world, activator, do_ability):
|
||||
|
||||
func discard(_world, activator, do_ability):
|
||||
ammo = max_ammo
|
||||
if do_ability:
|
||||
activator.dash(_activate);
|
||||
|
||||
func get_ammo():
|
||||
return ammo
|
||||
|
||||
@@ -47,8 +47,10 @@ func _activate(world, activator, position):
|
||||
assert(false, "who are you, activator?")
|
||||
world.add_child(mine)
|
||||
|
||||
func discard(world, activator, do_ability):
|
||||
func discard(_world, activator, do_ability):
|
||||
ammo = max_ammo
|
||||
if do_ability:
|
||||
activator.dash(null);
|
||||
|
||||
func get_ammo():
|
||||
return ammo
|
||||
|
||||
@@ -68,9 +68,10 @@ func charge():
|
||||
# Gradual charge dropoff
|
||||
charge_level = max(charge_level - charge_rate * 2, 0);
|
||||
|
||||
func dash(on_end: Callable):
|
||||
func dash(on_end):
|
||||
dash_cooldown_timer.start(dash_cooldown);
|
||||
var target_dir = position.direction_to(target)
|
||||
if (on_end):
|
||||
dash_cooldown_timer.timeout.connect(func(): on_end.call(null, self, target_dir), CONNECT_ONE_SHOT);
|
||||
velocity = move_direction * speed * 5;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user