a
This commit is contained in:
@@ -50,7 +50,7 @@ func _activate(world, activator, position):
|
||||
func discard(_world, activator, do_ability):
|
||||
ammo = max_ammo
|
||||
if do_ability:
|
||||
activator.dash(_activate);
|
||||
activator.dash(null);
|
||||
|
||||
func get_ammo():
|
||||
return ammo
|
||||
|
||||
@@ -71,7 +71,8 @@ func charge():
|
||||
func dash(on_end: Callable):
|
||||
dash_cooldown_timer.start(dash_cooldown);
|
||||
var target_dir = position.direction_to(target)
|
||||
dash_cooldown_timer.timeout.connect(func(): on_end.call(null, self, target_dir), CONNECT_ONE_SHOT);
|
||||
if (on_end):
|
||||
dash_cooldown_timer.timeout.connect(func(): on_end.call(null, self, target_dir), CONNECT_ONE_SHOT);
|
||||
velocity = move_direction * speed * 5;
|
||||
|
||||
func _ready():
|
||||
|
||||
Reference in New Issue
Block a user