diff --git a/backgounds/galaxy.gd b/backgounds/galaxy.gd new file mode 100644 index 0000000..44887b2 --- /dev/null +++ b/backgounds/galaxy.gd @@ -0,0 +1,14 @@ +extends Node2D + + +# Called when the node enters the scene tree for the first time. +var galaxy = load("res://levels/galaxy.tscn").instantiate() + +func _ready(): + get_tree().root.add_child.call_deferred(galaxy) + #pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass diff --git a/backgounds/galaxy.tscn b/backgounds/galaxy.tscn index 18b4998..58623c0 100644 --- a/backgounds/galaxy.tscn +++ b/backgounds/galaxy.tscn @@ -1,9 +1,11 @@ -[gd_scene load_steps=3 format=3 uid="uid://cnstwjy5mqdyo"] +[gd_scene load_steps=4 format=3 uid="uid://cnstwjy5mqdyo"] [ext_resource type="Texture2D" uid="uid://bona2ytn3y3a5" path="res://backgounds/galaxy.png" id="1_bmyxf"] +[ext_resource type="Script" path="res://backgounds/galaxy.gd" id="1_h1j80"] [ext_resource type="Texture2D" uid="uid://cpd31c6o18rmh" path="res://sprites/ss.png" id="2_67tpf"] [node name="galaxy" type="Node2D"] +script = ExtResource("1_h1j80") [node name="TextureRect" type="TextureRect" parent="."] offset_right = 1280.0