Added bullet_per_shot and sector_angle implementation
This commit is contained in:
@@ -18,6 +18,7 @@ signal destroyed
|
||||
@export var acceleration : int
|
||||
@export var max_distance : int
|
||||
@export var max_livetime : int
|
||||
@export var piercing: int
|
||||
|
||||
@export var collide_player: bool:
|
||||
set(value):
|
||||
@@ -65,12 +66,14 @@ func process_distance(delta: float) -> void:
|
||||
_traveled_distance += velocity.length() * delta
|
||||
if max_distance > 0 and _traveled_distance > max_distance:
|
||||
destroyed.emit()
|
||||
queue_free()
|
||||
|
||||
|
||||
func process_livetime(delta: float) -> void:
|
||||
_livetime += delta
|
||||
if _livetime > max_livetime:
|
||||
destroyed.emit()
|
||||
queue_free()
|
||||
|
||||
func _apply_collision_mask() -> void:
|
||||
collision_mask |= PROJECTILE_BORDER_LAYER
|
||||
|
||||
Reference in New Issue
Block a user