Added bullet indexing to create shot patterns

This commit is contained in:
Henry Faber 2026-06-13 12:05:13 +01:00
parent bdbc3b015f
commit 1725b8b754
13 changed files with 91 additions and 27 deletions

20
scenes/weapon_stock.gd Normal file
View file

@ -0,0 +1,20 @@
extends Area2D
@onready var bullet: PackedScene = load("res://scenes/weapon_stock.tscn")
@onready var shot_data: = load("res://resources/player_weapons/weapon_shot_stock.tres")
# Time offset when this bullet was fired (relative to other bullets)
var time_offset: float = 0.5
#func activate():
# Bullet does its damage/projectile work
func _process(delta):
#Calculation position along Y axis
position.y -= shot_data.speed * delta # Original Speed
#position.y -= 330 * delta # non-shot_data testing
func _on_visible_on_screen_notifier_2d_screen_exited() -> void:
queue_free()