Roughed in basically working equidistant bullet code thanks to Brendan,
Mackenzie, and Sophie.
This commit is contained in:
parent
97606c8233
commit
2594dd6e3d
4 changed files with 26 additions and 36 deletions
|
|
@ -7,15 +7,7 @@ extends Area2D
|
|||
|
||||
|
||||
func _process(delta):
|
||||
var spacing: int = 100
|
||||
var travel: float
|
||||
travel += shot_data.speed * delta + (player.position.y - player.previous_position.y)
|
||||
player.previous_position.y = player.position.y
|
||||
|
||||
if travel > spacing:
|
||||
print("travel is greater than spacing!")
|
||||
position += shot_data.speed * delta # This works normally
|
||||
travel -= spacing
|
||||
position.y += shot_data.speed * delta # This works normally
|
||||
|
||||
func _on_visible_on_screen_notifier_2d_screen_exited() -> void:
|
||||
queue_free()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue