first commit
This commit is contained in:
20
Scripts/bullet_stack.gd
Normal file
20
Scripts/bullet_stack.gd
Normal file
@@ -0,0 +1,20 @@
|
||||
extends Node3D
|
||||
@onready var bullet_sc = preload("res://Scenes/bullet.tscn")
|
||||
|
||||
|
||||
var bullets = Array()
|
||||
|
||||
var h_offset: float = 0.15
|
||||
var v_offset: float = 0.1
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
GameManager.set_bullet_stack(self)
|
||||
generate_bullet_stack()
|
||||
|
||||
func generate_bullet_stack():
|
||||
for i in range(1, 22, 1):
|
||||
var newBullet = bullet_sc.instantiate()
|
||||
newBullet.position = Vector3(i*h_offset,0,0)
|
||||
bullets.append(newBullet)
|
||||
add_child(newBullet)
|
||||
Reference in New Issue
Block a user