15 lines
403 B
GDScript
15 lines
403 B
GDScript
extends ActiveAbility
|
|
|
|
@export var speed_bonus: float = 2.0
|
|
@export var acceleration_time: float = 0.3
|
|
|
|
func _init() -> void:
|
|
ability_id = "afterburner"
|
|
cooldown = 30.0
|
|
|
|
func unavailable_reason(ship: CharacterBody2D) -> String:
|
|
return "Dopalacz już działa" if ship.call("is_boosting") else ""
|
|
|
|
func activate(ship: CharacterBody2D) -> void:
|
|
ship.call("start_boost", speed_bonus, acceleration_time)
|