mirror of
https://github.com/PfandBoss/SemesterGameJam2022.git
synced 2025-11-12 04:16:12 +01:00
push push
This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
extends Node3D
|
extends Node3D
|
||||||
|
|
||||||
|
var background
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
var background = preload("res://Background_straight.tscn").instantiate()
|
background = preload("res://background_straight.tscn").instantiate()
|
||||||
add_child(background)
|
add_child(background)
|
||||||
|
print(background.get_position())
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
pass
|
print(background.get_position())
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
[gd_scene load_steps=10 format=3 uid="uid://n7w0ff7u25yc"]
|
[gd_scene load_steps=9 format=3 uid="uid://n7w0ff7u25yc"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scripts/Logic/Game.gd" id="1_iox18"]
|
[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://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="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="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="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"]
|
[sub_resource type="BoxMesh" id="BoxMesh_ognqx"]
|
||||||
size = Vector3(13, 1, 25)
|
size = Vector3(13, 1, 25)
|
||||||
@@ -63,7 +62,3 @@ transform = Transform3D(-0.0154457, -5.21527e-12, 0.999882, -6.75147e-10, 1, -5.
|
|||||||
|
|
||||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 0.258819, 0.965926, 0, -0.965926, 0.258819, 0, 0, 0)
|
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")
|
|
||||||
|
|||||||
70
Nodes/gameTest.tscn
Normal file
70
Nodes/gameTest.tscn
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
[gd_scene load_steps=10 format=3 uid="uid://bxv6ootj1t6gp"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/Logic/Game.gd" id="1_fcsyg"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bqe8ucbruto1j" path="res://Nodes/StartNode.tscn" id="2_ocs5b"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/Train.gd" id="3_7p0po"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://byo1m0n20yl45" path="res://Nodes/cannon.tscn" id="4_3aj1d"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://vwjd5od63jgh" path="res://Nodes/Player.tscn" id="5_efv53"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cjcjlxjnw8h3c" path="res://backgroundspawner.tscn" id="6_lg36d"]
|
||||||
|
|
||||||
|
[sub_resource type="BoxMesh" id="BoxMesh_ognqx"]
|
||||||
|
size = Vector3(13, 1, 25)
|
||||||
|
|
||||||
|
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_p3d4e"]
|
||||||
|
data = PackedVector3Array(-6.5, 0.5, 12.5, 6.5, 0.5, 12.5, -6.5, -0.5, 12.5, 6.5, 0.5, 12.5, 6.5, -0.5, 12.5, -6.5, -0.5, 12.5, 6.5, 0.5, -12.5, -6.5, 0.5, -12.5, 6.5, -0.5, -12.5, -6.5, 0.5, -12.5, -6.5, -0.5, -12.5, 6.5, -0.5, -12.5, 6.5, 0.5, 12.5, 6.5, 0.5, -12.5, 6.5, -0.5, 12.5, 6.5, 0.5, -12.5, 6.5, -0.5, -12.5, 6.5, -0.5, 12.5, -6.5, 0.5, -12.5, -6.5, 0.5, 12.5, -6.5, -0.5, -12.5, -6.5, 0.5, 12.5, -6.5, -0.5, 12.5, -6.5, -0.5, -12.5, 6.5, 0.5, 12.5, -6.5, 0.5, 12.5, 6.5, 0.5, -12.5, -6.5, 0.5, 12.5, -6.5, 0.5, -12.5, 6.5, 0.5, -12.5, -6.5, -0.5, 12.5, 6.5, -0.5, 12.5, -6.5, -0.5, -12.5, 6.5, -0.5, 12.5, 6.5, -0.5, -12.5, -6.5, -0.5, -12.5)
|
||||||
|
|
||||||
|
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_l76gd"]
|
||||||
|
data = PackedVector3Array(-6.5, 0.5, 12.5, 6.5, 0.5, 12.5, -6.5, -0.5, 12.5, 6.5, 0.5, 12.5, 6.5, -0.5, 12.5, -6.5, -0.5, 12.5, 6.5, 0.5, -12.5, -6.5, 0.5, -12.5, 6.5, -0.5, -12.5, -6.5, 0.5, -12.5, -6.5, -0.5, -12.5, 6.5, -0.5, -12.5, 6.5, 0.5, 12.5, 6.5, 0.5, -12.5, 6.5, -0.5, 12.5, 6.5, 0.5, -12.5, 6.5, -0.5, -12.5, 6.5, -0.5, 12.5, -6.5, 0.5, -12.5, -6.5, 0.5, 12.5, -6.5, -0.5, -12.5, -6.5, 0.5, 12.5, -6.5, -0.5, 12.5, -6.5, -0.5, -12.5, 6.5, 0.5, 12.5, -6.5, 0.5, 12.5, 6.5, 0.5, -12.5, -6.5, 0.5, 12.5, -6.5, 0.5, -12.5, 6.5, 0.5, -12.5, -6.5, -0.5, 12.5, 6.5, -0.5, 12.5, -6.5, -0.5, -12.5, 6.5, -0.5, 12.5, 6.5, -0.5, -12.5, -6.5, -0.5, -12.5)
|
||||||
|
|
||||||
|
[node name="Game" type="Node"]
|
||||||
|
script = ExtResource("1_fcsyg")
|
||||||
|
|
||||||
|
[node name="StartNode" parent="." instance=ExtResource("2_ocs5b")]
|
||||||
|
|
||||||
|
[node name="Camera3D" type="Camera3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 20, 0)
|
||||||
|
|
||||||
|
[node name="Player1" type="Node3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 3.55271e-15, 0, 1, 0, -3.55271e-15, 0, 1, -8, 0, 8)
|
||||||
|
script = ExtResource("3_7p0po")
|
||||||
|
|
||||||
|
[node name="Cannon" parent="Player1" instance=ExtResource("4_3aj1d")]
|
||||||
|
|
||||||
|
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Player1"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0, -8)
|
||||||
|
mesh = SubResource("BoxMesh_ognqx")
|
||||||
|
|
||||||
|
[node name="StaticBody3D" type="StaticBody3D" parent="Player1/MeshInstance3D2"]
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Player1/MeshInstance3D2/StaticBody3D"]
|
||||||
|
shape = SubResource("ConcavePolygonShape3D_p3d4e")
|
||||||
|
|
||||||
|
[node name="CharacterBody3D" parent="Player1" instance=ExtResource("5_efv53")]
|
||||||
|
transform = Transform3D(1, 0, -3.55271e-15, 0, 1, 0, 3.55271e-15, 0, 1, -1.18815, 1, -11.064)
|
||||||
|
|
||||||
|
[node name="Cannon2" parent="Player1" instance=ExtResource("4_3aj1d")]
|
||||||
|
|
||||||
|
[node name="Backgroundspawner" parent="Player1" instance=ExtResource("6_lg36d")]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -43.4414)
|
||||||
|
|
||||||
|
[node name="Player2" type="Node3D" parent="."]
|
||||||
|
transform = Transform3D(-0.0154456, -6.75145e-10, -0.999879, -5.21344e-12, 1, -6.75146e-10, 0.999879, -5.2134e-12, -0.0154456, -8, 0, -32)
|
||||||
|
script = ExtResource("3_7p0po")
|
||||||
|
|
||||||
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="Player2"]
|
||||||
|
transform = Transform3D(-0.0154456, -5.21524e-12, 0.999881, -6.75146e-10, 1, -5.21521e-12, -0.999881, -6.75146e-10, -0.0154456, 31.7182, -1.23195e-08, -18.4921)
|
||||||
|
mesh = SubResource("BoxMesh_ognqx")
|
||||||
|
|
||||||
|
[node name="StaticBody3D" type="StaticBody3D" parent="Player2/MeshInstance3D"]
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Player2/MeshInstance3D/StaticBody3D"]
|
||||||
|
transform = Transform3D(1, 8.23952e-25, 0, -1.6479e-25, 1, 0, 0, -1.65436e-24, 1, 0, 0, 0)
|
||||||
|
shape = SubResource("ConcavePolygonShape3D_l76gd")
|
||||||
|
|
||||||
|
[node name="CharacterBody3D" parent="Player2" instance=ExtResource("5_efv53")]
|
||||||
|
transform = Transform3D(-0.0154457, -5.21527e-12, 0.999882, -6.75147e-10, 1, -5.21524e-12, -0.999882, -6.75146e-10, -0.0154457, 31.3762, 1.5, -17.7157)
|
||||||
|
|
||||||
|
[node name="Backgroundspawner" parent="Player2" instance=ExtResource("6_lg36d")]
|
||||||
|
|
||||||
|
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 0.258819, 0.965926, 0, -0.965926, 0.258819, 0, 0, 0)
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
[gd_scene load_steps=2 format=3 uid="uid://27eaxr1cxhjl"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://Backround.gd" id="1_hqtcb"]
|
|
||||||
|
|
||||||
[node name="Background" type="Node"]
|
|
||||||
script = ExtResource("1_hqtcb")
|
|
||||||
11
background_straight.gd
Normal file
11
background_straight.gd
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
extends Node3D
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready():
|
||||||
|
var tween = create_tween()
|
||||||
|
tween.tween_property(self,"position",Vector3(-8,0,40),5)
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta):
|
||||||
|
pass
|
||||||
@@ -1,9 +1,18 @@
|
|||||||
[gd_scene load_steps=2 format=3 uid="uid://bp0po6m6eby8h"]
|
[gd_scene load_steps=5 format=3 uid="uid://r5ulnwvlrya6"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://cy6x8d3xe8lux" path="res://icon.svg" id="1_52lw3"]
|
[ext_resource type="Texture2D" uid="uid://cy6x8d3xe8lux" path="res://icon.svg" id="1_52lw3"]
|
||||||
|
[ext_resource type="Script" path="res://background_straight.gd" id="1_obhgk"]
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect"]
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_aoi7r"]
|
||||||
offset_right = 1150.0
|
albedo_texture = ExtResource("1_52lw3")
|
||||||
offset_bottom = 645.0
|
|
||||||
scale = Vector2(1.00103, 1.009)
|
[sub_resource type="PlaneMesh" id="PlaneMesh_xipx2"]
|
||||||
texture = ExtResource("1_52lw3")
|
material = SubResource("StandardMaterial3D_aoi7r")
|
||||||
|
size = Vector2(5, 5)
|
||||||
|
|
||||||
|
[node name="Node3D" type="Node3D"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
|
||||||
|
script = ExtResource("1_obhgk")
|
||||||
|
|
||||||
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||||
|
mesh = SubResource("PlaneMesh_xipx2")
|
||||||
|
|||||||
7
backgroundspawner.tscn
Normal file
7
backgroundspawner.tscn
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://cjcjlxjnw8h3c"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://Nodes/Backgroundspawner.gd" id="1_01tg0"]
|
||||||
|
|
||||||
|
[node name="Backgroundspawner" type="Node3D"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -24)
|
||||||
|
script = ExtResource("1_01tg0")
|
||||||
Reference in New Issue
Block a user