diff --git a/Nodes/Backgroundspawner.gd b/Nodes/Backgroundspawner.gd new file mode 100644 index 0000000..10db588 --- /dev/null +++ b/Nodes/Backgroundspawner.gd @@ -0,0 +1,12 @@ +extends Node3D + + +# Called when the node enters the scene tree for the first time. +func _ready(): + var background = preload("res://Background_straight.tscn").instantiate() + add_child(background) + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass diff --git a/Nodes/game.tscn b/Nodes/game.tscn index f42b257..d026ff9 100644 --- a/Nodes/game.tscn +++ b/Nodes/game.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=9 format=3 uid="uid://n7w0ff7u25yc"] +[gd_scene load_steps=10 format=3 uid="uid://n7w0ff7u25yc"] [ext_resource type="Script" path="res://scripts/Logic/Game.gd" id="1_iox18"] [ext_resource type="PackedScene" uid="uid://bqe8ucbruto1j" path="res://Nodes/StartNode.tscn" id="2_61aog"] [ext_resource type="PackedScene" uid="uid://byo1m0n20yl45" path="res://Nodes/cannon.tscn" id="2_vrf6k"] [ext_resource type="Script" path="res://scripts/Train.gd" id="2_xl0he"] [ext_resource type="PackedScene" uid="uid://vwjd5od63jgh" path="res://Nodes/Player.tscn" id="4_1ipcp"] +[ext_resource type="Script" path="res://Nodes/Backgroundspawner.gd" id="6_dvu7i"] [sub_resource type="BoxMesh" id="BoxMesh_ognqx"] size = Vector3(13, 1, 25) @@ -62,3 +63,7 @@ transform = Transform3D(-0.0154457, -5.21527e-12, 0.999882, -6.75147e-10, 1, -5. [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] transform = Transform3D(1, 0, 0, 0, 0.258819, 0.965926, 0, -0.965926, 0.258819, 0, 0, 0) + +[node name="Backgroundspawner" type="Node3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -24) +script = ExtResource("6_dvu7i") diff --git a/background_straight.tscn b/background_straight.tscn index 4865949..6c1231a 100644 --- a/background_straight.tscn +++ b/background_straight.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=2 format=3 uid="uid://cgnegi0q52i3n"] +[gd_scene load_steps=2 format=3 uid="uid://bp0po6m6eby8h"] -[ext_resource type="Texture2D" uid="uid://cy6x8d3xe8lux" path="res://icon.svg" id="1_a2wr2"] +[ext_resource type="Texture2D" uid="uid://cy6x8d3xe8lux" path="res://icon.svg" id="1_52lw3"] -[node name="Background_straight" type="Node"] - -[node name="Sprite2D" type="Sprite2D" parent="."] -texture = ExtResource("1_a2wr2") +[node name="TextureRect" type="TextureRect"] +offset_right = 1150.0 +offset_bottom = 645.0 +scale = Vector2(1.00103, 1.009) +texture = ExtResource("1_52lw3") diff --git a/project.godot b/project.godot index c4c51aa..f9a62a0 100644 --- a/project.godot +++ b/project.godot @@ -69,12 +69,10 @@ _global_script_class_icons={ [application] config/name="Semester Game Jam 2022" -<<<<<<< HEAD run/main_scene="res://menu/main_menu.tscn" -======= ->>>>>>> parent of 742e4e2... Auto stash before merge of "main" and "origin/main" config/features=PackedStringArray("4.0", "Forward Plus") config/icon="res://icon.svg" +<<<<<<