GodotCourse/week2/updated_files/scripts/SceneManager.gd

17 lines
393 B
GDScript

extends Node
var bulletsFiredTotal := 0
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func manageBullet(bullet):
bulletsFiredTotal +=1
owner.add_child(bullet)
print("Total bullets fired "+str(bulletsFiredTotal))