GodotWIP/Main.gd

23 lines
467 B
GDScript3

extends Node2D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
var camera :Camera2D
# Called when the node enters the scene tree for the first time.
func _ready():
camera = $Path2D/PathFollow2D/Camera2D
camera.make_current()
for child in get_children():
print(child)
if child is Player:
camera = child.get_node("Camera2D")
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass