mirror of
https://github.com/godotengine/regression-test-project.git
synced 2026-01-01 01:48:47 +03:00
Resave scenes and fix support for new classes
This commit is contained in:
21
.github/workflows/linux_builds_swiftshader.yml
vendored
21
.github/workflows/linux_builds_swiftshader.yml
vendored
@@ -23,20 +23,6 @@ jobs:
|
||||
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm \
|
||||
xvfb wget2 unzip python scons git
|
||||
|
||||
# - name: Download Godot
|
||||
# run: |
|
||||
# wget2 https://archive.hugo.pro/builds/godot/master/editor/godot-linux-nightly-x86_64.zip
|
||||
# unzip godot-linux-nightly-x86_64.zip
|
||||
# rm godot-linux-nightly-x86_64.zip
|
||||
# mv godot godot.linuxbsd.tools.64s
|
||||
|
||||
# - name: Download Godot(ZIP)
|
||||
# run: |
|
||||
# wget2 https://github.com/godotengine/godot/archive/3.2.zip
|
||||
# unzip 3.2.zip
|
||||
# rm 3.2.zip
|
||||
|
||||
|
||||
- name: Download Godot(GIT)
|
||||
run: |
|
||||
git clone https://github.com/godotengine/godot.git
|
||||
@@ -55,15 +41,14 @@ jobs:
|
||||
# Download, unzip and setup SwiftShader library
|
||||
- name: Download SwiftShader
|
||||
run: |
|
||||
wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/swiftshader.zip
|
||||
unzip swiftshader.zip
|
||||
rm swiftshader.zip
|
||||
wget https://github.com/godotengine/regression-test-project/releases/download/_ci-deps/swiftshader-ubuntu20.04-20211002.zip
|
||||
unzip swiftshader-ubuntu20.04-20211002.zip
|
||||
curr="$(pwd)/libvk_swiftshader.so"
|
||||
sed -i "s|PATH_TO_CHANGE|$curr|" vk_swiftshader_icd.json
|
||||
|
||||
- name: Open Editor
|
||||
run: |
|
||||
VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run ./godot.linuxbsd.tools.64.san --audio-driver Dummy -e -q --path $(pwd) 2>&1 | tee sanitizers_log.txt || true
|
||||
VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run ./godot.linuxbsd.tools.64.san --audio-driver Dummy -e --quit --path $(pwd) 2>&1 | tee sanitizers_log.txt || true
|
||||
misc/check_ci_log.py sanitizers_log.txt
|
||||
|
||||
- name: Run Project
|
||||
|
||||
Binary file not shown.
@@ -1,3 +1,3 @@
|
||||
source_md5="d98fe5b307b619f42f0bd920ee4f170d"
|
||||
dest_md5="81b444fc2bdc6ece1bac1f0f60b9deb1"
|
||||
dest_md5="b6bcb6475c7f9533c0da43df2f9260c7"
|
||||
|
||||
|
||||
Binary file not shown.
@@ -20,7 +20,6 @@ const alone_steps: Array = [
|
||||
"res://Nodes/Nodes.tscn",
|
||||
"res://Physics/2D/Physics2D.tscn",
|
||||
"res://Physics/3D/Physics3D.tscn",
|
||||
# "res://ReparentingDeleting/ReparentingDeleting.tscn", Not always reproducible
|
||||
"res://AutomaticBugs/FunctionExecutor.tscn", # Only need to run once
|
||||
]
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ var function_exceptions: Array = [
|
||||
|
||||
# Globally disabled classes which causes bugs or are very hard to use properly
|
||||
var disabled_classes: Array = [
|
||||
"GLTFDocument", # TODO memory leak
|
||||
"GLTFDocument", # TODO memory leak
|
||||
###
|
||||
### Crashes, Freezes
|
||||
###
|
||||
@@ -278,15 +278,13 @@ func check_if_is_allowed(method_data: Dictionary) -> bool:
|
||||
|
||||
for arg in method_data["args"]:
|
||||
var name_of_class: String = arg["class_name"]
|
||||
if name_of_class.is_empty():
|
||||
continue
|
||||
if name_of_class in disabled_classes:
|
||||
return false
|
||||
|
||||
if !ClassDB.class_exists(name_of_class):
|
||||
return false
|
||||
|
||||
if !ClassDB.is_parent_class(name_of_class, "Node") && !ClassDB.is_parent_class(name_of_class, "RefCounted"):
|
||||
if !name_of_class.is_empty() && !ClassDB.is_parent_class(name_of_class, "Node") && !ClassDB.is_parent_class(name_of_class, "RefCounted"):
|
||||
return false
|
||||
|
||||
if name_of_class.find("Editor") != -1 || name_of_class.find("SkinReference") != -1:
|
||||
@@ -295,6 +293,7 @@ func check_if_is_allowed(method_data: Dictionary) -> bool:
|
||||
# In case of adding new type, this prevents from crashing due not recognizing this type
|
||||
# In case of removing/rename type, just comment e.g. TYPE_ARRAY and all occurencies on e.g. switch statement with it
|
||||
var t: int = arg["type"]
|
||||
print(t + " #############################################")
|
||||
if !(
|
||||
t == TYPE_NIL
|
||||
|| t == TYPE_CALLABLE
|
||||
@@ -335,6 +334,9 @@ func check_if_is_allowed(method_data: Dictionary) -> bool:
|
||||
print("----------------------------------------------------------- TODO - MISSING TYPE, ADD SUPPORT IT") # Add assert here to get info which type is missing
|
||||
return false
|
||||
|
||||
if name_of_class.is_empty():
|
||||
continue
|
||||
|
||||
return true
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
[gd_scene load_steps=2 format=3 uid="uid://oetsm6d6u1q4"]
|
||||
|
||||
[ext_resource path="res://Nodes/Nodes.gd" type="Script" id=1]
|
||||
[ext_resource type="Script" path="res://Nodes/Nodes.gd" id="1"]
|
||||
|
||||
[node name="Nodes" type="Node"]
|
||||
script = ExtResource( 1 )
|
||||
script = ExtResource( "1" )
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://kljbsmhghnm2"]
|
||||
|
||||
[ext_resource path="res://icon.png" type="Texture2D" id=1]
|
||||
[ext_resource path="res://Physics/2D/Area2D.gd" type="Script" id=2]
|
||||
[ext_resource type="Texture2D" uid="uid://bkhft4ksf6bm8" path="res://icon.png" id="1"]
|
||||
[ext_resource type="Script" path="res://Physics/2D/Area2D.gd" id="2"]
|
||||
|
||||
[node name="Area2D" type="Area2D"]
|
||||
script = ExtResource( 2 )
|
||||
script = ExtResource( "2" )
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
|
||||
polygon = PackedVector2Array( 4.018, -13.1782, -15.9057, 3.23778, 1.63277, 17.5492, 19.3115, 2.39594 )
|
||||
polygon = PackedVector2Array(4.018, -13.1782, -15.9057, 3.23778, 1.63277, 17.5492, 19.3115, 2.39594)
|
||||
|
||||
[node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="."]
|
||||
polygon = PackedVector2Array( -4.58427, -16.8342, -20.5974, -4.94143, -8.23639, 16.784, 20.4187, 13.5065 )
|
||||
polygon = PackedVector2Array(-4.58427, -16.8342, -20.5974, -4.94143, -8.23639, 16.784, 20.4187, 13.5065)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource( 1 )
|
||||
texture = ExtResource( "1" )
|
||||
|
||||
[connection signal="area_entered" from="." to="." method="_on_Area2D_area_entered"]
|
||||
[connection signal="body_entered" from="." to="." method="_on_Area2D_body_entered"]
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dwtmoy5nn03sd"]
|
||||
|
||||
[ext_resource path="res://icon.png" type="Texture2D" id=1]
|
||||
[ext_resource path="res://Physics/2D/KinematicBody2D.gd" type="Script" id=2]
|
||||
[ext_resource type="Texture2D" uid="uid://bkhft4ksf6bm8" path="res://icon.png" id="1"]
|
||||
[ext_resource type="Script" path="res://Physics/2D/KinematicBody2D.gd" id="2"]
|
||||
|
||||
[node name="CharacterBody2D" type="CharacterBody2D"]
|
||||
script = ExtResource( 2 )
|
||||
script = ExtResource( "2" )
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
modulate = Color( 0.74902, 0.133333, 0.133333, 1 )
|
||||
modulate = Color(0.74902, 0.133333, 0.133333, 1)
|
||||
rotation = 4.45932
|
||||
texture = ExtResource( 1 )
|
||||
texture = ExtResource( "1" )
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
|
||||
polygon = PackedVector2Array( -10.6781, -7.48182, -12.4953, 17.1263, 15.2543, 6.19464, 4.32263, -14.4073 )
|
||||
polygon = PackedVector2Array(-10.6781, -7.48182, -12.4953, 17.1263, 15.2543, 6.19464, 4.32263, -14.4073)
|
||||
|
||||
@@ -1,262 +1,262 @@
|
||||
[gd_scene load_steps=7 format=2]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://du6cvd7rub6o"]
|
||||
|
||||
[ext_resource path="res://Physics/2D/Physics2D.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Physics/2D/Area2D.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://Physics/2D/KinematicBody2D.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://Physics/2D/StaticBody2D.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://Physics/2D/RigidBody2D.tscn" type="PackedScene" id=5]
|
||||
[ext_resource type="Script" path="res://Physics/2D/Physics2D.gd" id="1"]
|
||||
[ext_resource type="PackedScene" uid="uid://kljbsmhghnm2" path="res://Physics/2D/Area2D.tscn" id="2"]
|
||||
[ext_resource type="PackedScene" uid="uid://dwtmoy5nn03sd" path="res://Physics/2D/KinematicBody2D.tscn" id="3"]
|
||||
[ext_resource type="PackedScene" path="res://Physics/2D/StaticBody2D.tscn" id="4"]
|
||||
[ext_resource type="PackedScene" path="res://Physics/2D/RigidBody2D.tscn" id="5"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 552.521, 10.3948 )
|
||||
[sub_resource type="RectangleShape2D" id="1"]
|
||||
size = Vector2(1105.04, 20.7896)
|
||||
|
||||
[node name="Physics2D" type="Node2D"]
|
||||
script = ExtResource( 1 )
|
||||
script = ExtResource( "1" )
|
||||
|
||||
[node name="Area2D" type="Node2D" parent="."]
|
||||
|
||||
[node name="Area2D" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 166.677, 52.3842 )
|
||||
[node name="Area2D" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(166.677, 52.3842)
|
||||
|
||||
[node name="Area2D2" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 209.537, 193.663 )
|
||||
[node name="Area2D2" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(209.537, 193.663)
|
||||
|
||||
[node name="Area2D3" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 450.822, 122.23 )
|
||||
[node name="Area2D3" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(450.822, 122.23)
|
||||
|
||||
[node name="Area2D4" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 336.529, 293.669 )
|
||||
[node name="Area2D4" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(336.529, 293.669)
|
||||
|
||||
[node name="Area2D5" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 555.59, 42.8598 )
|
||||
[node name="Area2D5" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(555.59, 42.8598)
|
||||
|
||||
[node name="Area2D6" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 598.45, 184.139 )
|
||||
[node name="Area2D6" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(598.45, 184.139)
|
||||
|
||||
[node name="Area2D7" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 839.735, 112.705 )
|
||||
[node name="Area2D7" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(839.735, 112.705)
|
||||
|
||||
[node name="Area2D8" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 725.442, 284.145 )
|
||||
[node name="Area2D8" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(725.442, 284.145)
|
||||
|
||||
[node name="Area2D10" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 420.661, 330.179 )
|
||||
[node name="Area2D10" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(420.661, 330.179)
|
||||
|
||||
[node name="Area2D12" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 547.653, 430.186 )
|
||||
[node name="Area2D12" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(547.653, 430.186)
|
||||
|
||||
[node name="Area2D14" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 122.23, 457.171 )
|
||||
[node name="Area2D14" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(122.23, 457.171)
|
||||
|
||||
[node name="Area2D16" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 249.222, 557.178 )
|
||||
[node name="Area2D16" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(249.222, 557.178)
|
||||
|
||||
[node name="Area2D18" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 660.359, 444.472 )
|
||||
[node name="Area2D18" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(660.359, 444.472)
|
||||
|
||||
[node name="Area2D19" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 901.644, 373.039 )
|
||||
[node name="Area2D19" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(901.644, 373.039)
|
||||
|
||||
[node name="Area2D20" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 787.351, 544.478 )
|
||||
[node name="Area2D20" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(787.351, 544.478)
|
||||
|
||||
[node name="Area2D9" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 660.036, 115.278 )
|
||||
[node name="Area2D9" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(660.036, 115.278)
|
||||
|
||||
[node name="Area2D11" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 355.255, 161.312 )
|
||||
[node name="Area2D11" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(355.255, 161.312)
|
||||
|
||||
[node name="Area2D13" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 482.247, 261.319 )
|
||||
[node name="Area2D13" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(482.247, 261.319)
|
||||
|
||||
[node name="Area2D15" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 56.8237, 288.304 )
|
||||
[node name="Area2D15" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(56.8237, 288.304)
|
||||
|
||||
[node name="Area2D17" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 183.816, 388.311 )
|
||||
[node name="Area2D17" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(183.816, 388.311)
|
||||
|
||||
[node name="Area2D21" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 594.953, 275.605 )
|
||||
[node name="Area2D21" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(594.953, 275.605)
|
||||
|
||||
[node name="Area2D22" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 836.238, 204.172 )
|
||||
[node name="Area2D22" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(836.238, 204.172)
|
||||
|
||||
[node name="Area2D23" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 721.945, 375.611 )
|
||||
[node name="Area2D23" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(721.945, 375.611)
|
||||
|
||||
[node name="Area2D24" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 696.901, 221.117 )
|
||||
[node name="Area2D24" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(696.901, 221.117)
|
||||
|
||||
[node name="Area2D25" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 392.12, 267.151 )
|
||||
[node name="Area2D25" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(392.12, 267.151)
|
||||
|
||||
[node name="Area2D26" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 519.112, 367.158 )
|
||||
[node name="Area2D26" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(519.112, 367.158)
|
||||
|
||||
[node name="Area2D27" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 93.689, 394.143 )
|
||||
[node name="Area2D27" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(93.689, 394.143)
|
||||
|
||||
[node name="Area2D28" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 220.681, 494.15 )
|
||||
[node name="Area2D28" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(220.681, 494.15)
|
||||
|
||||
[node name="Area2D29" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 631.818, 381.444 )
|
||||
[node name="Area2D29" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(631.818, 381.444)
|
||||
|
||||
[node name="Area2D30" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 873.103, 310.011 )
|
||||
[node name="Area2D30" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(873.103, 310.011)
|
||||
|
||||
[node name="Area2D31" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 758.81, 481.45 )
|
||||
[node name="Area2D31" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(758.81, 481.45)
|
||||
|
||||
[node name="Area2D32" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 639.819, 9.43819 )
|
||||
[node name="Area2D32" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(639.819, 9.43819)
|
||||
|
||||
[node name="Area2D33" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 335.038, 55.4722 )
|
||||
[node name="Area2D33" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(335.038, 55.4722)
|
||||
|
||||
[node name="Area2D34" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 462.03, 155.479 )
|
||||
[node name="Area2D34" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(462.03, 155.479)
|
||||
|
||||
[node name="Area2D35" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 36.6071, 182.464 )
|
||||
[node name="Area2D35" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(36.6071, 182.464)
|
||||
|
||||
[node name="Area2D36" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 163.599, 282.471 )
|
||||
[node name="Area2D36" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(163.599, 282.471)
|
||||
|
||||
[node name="Area2D37" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 574.736, 169.765 )
|
||||
[node name="Area2D37" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(574.736, 169.765)
|
||||
|
||||
[node name="Area2D38" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 816.021, 98.3322 )
|
||||
[node name="Area2D38" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(816.021, 98.3322)
|
||||
|
||||
[node name="Area2D39" parent="Area2D" instance=ExtResource( 2 )]
|
||||
position = Vector2( 701.728, 269.771 )
|
||||
[node name="Area2D39" parent="Area2D" instance=ExtResource( "2" )]
|
||||
position = Vector2(701.728, 269.771)
|
||||
|
||||
[node name="CharacterBody2D" type="Node2D" parent="."]
|
||||
|
||||
[node name="CharacterBody2D" parent="CharacterBody2D" instance=ExtResource( 3 )]
|
||||
position = Vector2( 90.4819, 302.4 )
|
||||
[node name="CharacterBody2D" parent="CharacterBody2D" instance=ExtResource( "3" )]
|
||||
position = Vector2(90.4819, 302.4)
|
||||
|
||||
[node name="KinematicBody2D2" parent="CharacterBody2D" instance=ExtResource( 3 )]
|
||||
position = Vector2( 380.142, 465.25 )
|
||||
[node name="KinematicBody2D2" parent="CharacterBody2D" instance=ExtResource( "3" )]
|
||||
position = Vector2(380.142, 465.25)
|
||||
|
||||
[node name="KinematicBody2D3" parent="CharacterBody2D" instance=ExtResource( 3 )]
|
||||
position = Vector2( 333.423, 131.54 )
|
||||
[node name="KinematicBody2D3" parent="CharacterBody2D" instance=ExtResource( "3" )]
|
||||
position = Vector2(333.423, 131.54)
|
||||
|
||||
[node name="KinematicBody2D4" parent="CharacterBody2D" instance=ExtResource( 3 )]
|
||||
position = Vector2( 509.622, 242.332 )
|
||||
[node name="KinematicBody2D4" parent="CharacterBody2D" instance=ExtResource( "3" )]
|
||||
position = Vector2(509.622, 242.332)
|
||||
|
||||
[node name="KinematicBody2D5" parent="CharacterBody2D" instance=ExtResource( 3 )]
|
||||
position = Vector2( 914.078, 76.812 )
|
||||
[node name="KinematicBody2D5" parent="CharacterBody2D" instance=ExtResource( "3" )]
|
||||
position = Vector2(914.078, 76.812)
|
||||
|
||||
[node name="KinematicBody2D6" parent="CharacterBody2D" instance=ExtResource( 3 )]
|
||||
position = Vector2( 251.025, 329.752 )
|
||||
[node name="KinematicBody2D6" parent="CharacterBody2D" instance=ExtResource( "3" )]
|
||||
position = Vector2(251.025, 329.752)
|
||||
|
||||
[node name="KinematicBody2D7" parent="CharacterBody2D" instance=ExtResource( 3 )]
|
||||
position = Vector2( 540.685, 492.602 )
|
||||
[node name="KinematicBody2D7" parent="CharacterBody2D" instance=ExtResource( "3" )]
|
||||
position = Vector2(540.685, 492.602)
|
||||
|
||||
[node name="KinematicBody2D8" parent="CharacterBody2D" instance=ExtResource( 3 )]
|
||||
position = Vector2( 493.966, 158.892 )
|
||||
[node name="KinematicBody2D8" parent="CharacterBody2D" instance=ExtResource( "3" )]
|
||||
position = Vector2(493.966, 158.892)
|
||||
|
||||
[node name="KinematicBody2D9" parent="CharacterBody2D" instance=ExtResource( 3 )]
|
||||
position = Vector2( 670.165, 269.684 )
|
||||
[node name="KinematicBody2D9" parent="CharacterBody2D" instance=ExtResource( "3" )]
|
||||
position = Vector2(670.165, 269.684)
|
||||
|
||||
[node name="KinematicBody2D10" parent="CharacterBody2D" instance=ExtResource( 3 )]
|
||||
position = Vector2( 926.288, 135.628 )
|
||||
[node name="KinematicBody2D10" parent="CharacterBody2D" instance=ExtResource( "3" )]
|
||||
position = Vector2(926.288, 135.628)
|
||||
|
||||
[node name="StaticBody2D" type="Node2D" parent="."]
|
||||
position = Vector2( 73.6327, 117.071 )
|
||||
position = Vector2(73.6327, 117.071)
|
||||
|
||||
[node name="StaticBody2D" parent="StaticBody2D" instance=ExtResource( 4 )]
|
||||
[node name="StaticBody2D" parent="StaticBody2D" instance=ExtResource( "4" )]
|
||||
|
||||
[node name="StaticBody2D2" parent="StaticBody2D" instance=ExtResource( 4 )]
|
||||
position = Vector2( 171.12, 267.286 )
|
||||
[node name="StaticBody2D2" parent="StaticBody2D" instance=ExtResource( "4" )]
|
||||
position = Vector2(171.12, 267.286)
|
||||
|
||||
[node name="StaticBody2D3" parent="StaticBody2D" instance=ExtResource( 4 )]
|
||||
position = Vector2( 618.011, -2.82837 )
|
||||
[node name="StaticBody2D3" parent="StaticBody2D" instance=ExtResource( "4" )]
|
||||
position = Vector2(618.011, -2.82837)
|
||||
|
||||
[node name="StaticBody2D4" parent="StaticBody2D" instance=ExtResource( 4 )]
|
||||
position = Vector2( 793.374, 120.208 )
|
||||
[node name="StaticBody2D4" parent="StaticBody2D" instance=ExtResource( "4" )]
|
||||
position = Vector2(793.374, 120.208)
|
||||
|
||||
[node name="StaticBody2D6" parent="StaticBody2D" instance=ExtResource( 4 )]
|
||||
position = Vector2( 68.974, 216.436 )
|
||||
[node name="StaticBody2D6" parent="StaticBody2D" instance=ExtResource( "4" )]
|
||||
position = Vector2(68.974, 216.436)
|
||||
|
||||
[node name="StaticBody2D7" parent="StaticBody2D" instance=ExtResource( 4 )]
|
||||
position = Vector2( 246.087, 431.281 )
|
||||
[node name="StaticBody2D7" parent="StaticBody2D" instance=ExtResource( "4" )]
|
||||
position = Vector2(246.087, 431.281)
|
||||
|
||||
[node name="StaticBody2D8" parent="StaticBody2D" instance=ExtResource( 4 )]
|
||||
position = Vector2( 686.985, 213.607 )
|
||||
[node name="StaticBody2D8" parent="StaticBody2D" instance=ExtResource( "4" )]
|
||||
position = Vector2(686.985, 213.607)
|
||||
|
||||
[node name="StaticBody2D9" parent="StaticBody2D" instance=ExtResource( 4 )]
|
||||
position = Vector2( 862.348, 336.644 )
|
||||
[node name="StaticBody2D9" parent="StaticBody2D" instance=ExtResource( "4" )]
|
||||
position = Vector2(862.348, 336.644)
|
||||
|
||||
[node name="StaticBody2D5" parent="StaticBody2D" instance=ExtResource( 4 )]
|
||||
position = Vector2( 704.278, 296.985 )
|
||||
[node name="StaticBody2D5" parent="StaticBody2D" instance=ExtResource( "4" )]
|
||||
position = Vector2(704.278, 296.985)
|
||||
|
||||
[node name="RigidDynamicBody2D" type="Node2D" parent="."]
|
||||
|
||||
[node name="RigidDynamicBody2D" parent="RigidDynamicBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 178.191, 120.915 )
|
||||
[node name="RigidDynamicBody2D" parent="RigidDynamicBody2D" instance=ExtResource( "5" )]
|
||||
position = Vector2(178.191, 120.915)
|
||||
|
||||
[node name="RigidBody2D2" parent="RigidDynamicBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 192.874, 313.132 )
|
||||
[node name="RigidBody2D2" parent="RigidDynamicBody2D" instance=ExtResource( "5" )]
|
||||
position = Vector2(192.874, 313.132)
|
||||
|
||||
[node name="RigidBody2D3" parent="RigidDynamicBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 386.426, 210.35 )
|
||||
[node name="RigidBody2D3" parent="RigidDynamicBody2D" instance=ExtResource( "5" )]
|
||||
position = Vector2(386.426, 210.35)
|
||||
|
||||
[node name="RigidBody2D4" parent="RigidDynamicBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 374.412, 43.4946 )
|
||||
[node name="RigidBody2D4" parent="RigidDynamicBody2D" instance=ExtResource( "5" )]
|
||||
position = Vector2(374.412, 43.4946)
|
||||
|
||||
[node name="RigidBody2D5" parent="RigidDynamicBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 609.344, 331.82 )
|
||||
[node name="RigidBody2D5" parent="RigidDynamicBody2D" instance=ExtResource( "5" )]
|
||||
position = Vector2(609.344, 331.82)
|
||||
|
||||
[node name="RigidBody2D6" parent="RigidDynamicBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 756.177, 187.657 )
|
||||
[node name="RigidBody2D6" parent="RigidDynamicBody2D" instance=ExtResource( "5" )]
|
||||
position = Vector2(756.177, 187.657)
|
||||
|
||||
[node name="RigidBody2D7" parent="RigidDynamicBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 754.842, 43.4946 )
|
||||
[node name="RigidBody2D7" parent="RigidDynamicBody2D" instance=ExtResource( "5" )]
|
||||
position = Vector2(754.842, 43.4946)
|
||||
|
||||
[node name="RigidBody2D8" parent="RigidDynamicBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 490.543, 544.06 )
|
||||
[node name="RigidBody2D8" parent="RigidDynamicBody2D" instance=ExtResource( "5" )]
|
||||
position = Vector2(490.543, 544.06)
|
||||
|
||||
[node name="RigidBody2D9" parent="RigidDynamicBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 490.543, 544.06 )
|
||||
[node name="RigidBody2D9" parent="RigidDynamicBody2D" instance=ExtResource( "5" )]
|
||||
position = Vector2(490.543, 544.06)
|
||||
|
||||
[node name="RigidBody2D10" parent="RigidDynamicBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 282.873, 201.928 )
|
||||
[node name="RigidBody2D10" parent="RigidDynamicBody2D" instance=ExtResource( "5" )]
|
||||
position = Vector2(282.873, 201.928)
|
||||
|
||||
[node name="RigidBody2D11" parent="RigidDynamicBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 281.538, 57.7651 )
|
||||
[node name="RigidBody2D11" parent="RigidDynamicBody2D" instance=ExtResource( "5" )]
|
||||
position = Vector2(281.538, 57.7651)
|
||||
|
||||
[node name="RigidBody2D12" parent="RigidDynamicBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 45.7064, 532.859 )
|
||||
[node name="RigidBody2D12" parent="RigidDynamicBody2D" instance=ExtResource( "5" )]
|
||||
position = Vector2(45.7064, 532.859)
|
||||
|
||||
[node name="RigidBody2D13" parent="RigidDynamicBody2D" instance=ExtResource( 5 )]
|
||||
position = Vector2( 45.7064, 532.859 )
|
||||
[node name="RigidBody2D13" parent="RigidDynamicBody2D" instance=ExtResource( "5" )]
|
||||
position = Vector2(45.7064, 532.859)
|
||||
|
||||
[node name="Barriers" type="Node2D" parent="."]
|
||||
|
||||
[node name="Corner" type="StaticBody2D" parent="Barriers"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Barriers/Corner"]
|
||||
position = Vector2( 7.93701, 317.48 )
|
||||
position = Vector2(7.93701, 317.48)
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 1 )
|
||||
shape = SubResource( "1" )
|
||||
|
||||
[node name="Corner2" type="StaticBody2D" parent="Barriers"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Barriers/Corner2"]
|
||||
position = Vector2( 1017.52, 365.102 )
|
||||
position = Vector2(1017.52, 365.102)
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 1 )
|
||||
shape = SubResource( "1" )
|
||||
|
||||
[node name="Corner3" type="StaticBody2D" parent="Barriers"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Barriers/Corner3"]
|
||||
position = Vector2( 503.206, -19.0488 )
|
||||
shape = SubResource( 1 )
|
||||
position = Vector2(503.206, -19.0488)
|
||||
shape = SubResource( "1" )
|
||||
|
||||
[node name="Corner4" type="StaticBody2D" parent="Barriers"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Barriers/Corner4"]
|
||||
position = Vector2( 492.094, 576.227 )
|
||||
shape = SubResource( 1 )
|
||||
position = Vector2(492.094, 576.227)
|
||||
shape = SubResource( "1" )
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://ud2rfch1x47l"]
|
||||
|
||||
[ext_resource path="res://Physics/2D/RigidBody2D.gd" type="Script" id=1]
|
||||
[ext_resource path="res://icon.png" type="Texture2D" id=2]
|
||||
[ext_resource type="Script" path="res://Physics/2D/RigidBody2D.gd" id="1"]
|
||||
[ext_resource type="Texture2D" uid="uid://bkhft4ksf6bm8" path="res://icon.png" id="2"]
|
||||
|
||||
[node name="RigidDynamicBody2D" type="RigidDynamicBody2D"]
|
||||
gravity_scale = 0.1
|
||||
script = ExtResource( 1 )
|
||||
script = ExtResource( "1" )
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
|
||||
polygon = PackedVector2Array( -2.29324, -15.2017, -12.0322, 4.46353, 8.38219, 7.64743 )
|
||||
polygon = PackedVector2Array(-2.29324, -15.2017, -12.0322, 4.46353, 8.38219, 7.64743)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
modulate = Color( 0.47451, 0, 0.427451, 1 )
|
||||
modulate = Color(0.47451, 0, 0.427451, 1)
|
||||
rotation = 0.792379
|
||||
texture = ExtResource( 2 )
|
||||
texture = ExtResource( "2" )
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://33q68e8e6b8i"]
|
||||
|
||||
[ext_resource path="res://icon.png" type="Texture2D" id=1]
|
||||
[ext_resource path="res://Physics/2D/StaticBody2D.gd" type="Script" id=2]
|
||||
[ext_resource type="Texture2D" uid="uid://bkhft4ksf6bm8" path="res://icon.png" id="1"]
|
||||
[ext_resource type="Script" path="res://Physics/2D/StaticBody2D.gd" id="2"]
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D"]
|
||||
script = ExtResource( 2 )
|
||||
script = ExtResource( "2" )
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
|
||||
polygon = PackedVector2Array( -0.566719, -5.64549, -7.24092, 1.19557, -2.06841, 8.20348, 5.60692, 5.20009, 4.10522, -5.14492 )
|
||||
polygon = PackedVector2Array(-0.566719, -5.64549, -7.24092, 1.19557, -2.06841, 8.20348, 5.60692, 5.20009, 4.10522, -5.14492)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
modulate = Color( 0, 1, 1, 0.584314 )
|
||||
modulate = Color(0, 1, 1, 0.584314)
|
||||
rotation = 0.270526
|
||||
texture = ExtResource( 1 )
|
||||
texture = ExtResource( "1" )
|
||||
|
||||
@@ -1,199 +1,176 @@
|
||||
[gd_scene load_steps=11 format=2]
|
||||
[gd_scene load_steps=11 format=3 uid="uid://cl4hc7gt5h8ee"]
|
||||
|
||||
[ext_resource path="res://icon.png" type="Texture2D" id=1]
|
||||
[ext_resource path="res://Physics/3D/StaticArena.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Physics/3D/RigidBody3D.tscn" type="PackedScene" id=3]
|
||||
[ext_resource type="Texture2D" uid="uid://bkhft4ksf6bm8" path="res://icon.png" id="1"]
|
||||
[ext_resource type="Script" path="res://Physics/3D/StaticArena.gd" id="2"]
|
||||
[ext_resource type="PackedScene" path="res://Physics/3D/RigidBody3D.tscn" id="3"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id=1]
|
||||
[sub_resource type="PhysicsMaterial" id="1"]
|
||||
friction = 0.89
|
||||
rough = true
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id=2]
|
||||
albedo_color = Color( 1, 1, 1, 0.521569 )
|
||||
albedo_texture = ExtResource( 1 )
|
||||
[sub_resource type="StandardMaterial3D" id="2"]
|
||||
albedo_color = Color(1, 1, 1, 0.521569)
|
||||
albedo_texture = ExtResource( "1" )
|
||||
metallic = 1.0
|
||||
metallic_specular = 0.86
|
||||
metallic_texture = ExtResource( 1 )
|
||||
metallic_texture = ExtResource( "1" )
|
||||
|
||||
[sub_resource type="BoxShape3D" id=3]
|
||||
extents = Vector3( 50, 2, 50 )
|
||||
[sub_resource type="BoxShape3D" id="3"]
|
||||
size = Vector3(100, 4, 100)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id=4]
|
||||
params_diffuse_mode = 1
|
||||
albedo_texture = ExtResource( 1 )
|
||||
[sub_resource type="StandardMaterial3D" id="4"]
|
||||
diffuse_mode = 1
|
||||
albedo_texture = ExtResource( "1" )
|
||||
metallic = 0.8
|
||||
|
||||
[sub_resource type="BoxShape3D" id=5]
|
||||
extents = Vector3( 50, 20, 5 )
|
||||
[sub_resource type="BoxShape3D" id="5"]
|
||||
size = Vector3(100, 40, 10)
|
||||
|
||||
[sub_resource type="BoxShape3D" id=6]
|
||||
extents = Vector3( 11.8794, 1.37845, 22.281 )
|
||||
[sub_resource type="BoxShape3D" id="6"]
|
||||
size = Vector3(23.7588, 2.7569, 44.562)
|
||||
|
||||
[sub_resource type="BoxShape3D" id=7]
|
||||
extents = Vector3( 11.8794, 1.37845, 22.281 )
|
||||
[sub_resource type="BoxShape3D" id="7"]
|
||||
size = Vector3(23.7588, 2.7569, 44.562)
|
||||
|
||||
[node name="Physics3D" type="Node3D"]
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||
transform = Transform3D( 1, 0, 0, 0, -0.959707, 0.281002, 0, -0.281002, -0.959707, 0, 35.3705, 0 )
|
||||
transform = Transform3D(1, 0, 0, 0, -0.959707, 0.281002, 0, -0.281002, -0.959707, 0, 35.3705, 0)
|
||||
light_energy = 1.45
|
||||
|
||||
[node name="StaticArena" type="Node3D" parent="."]
|
||||
script = ExtResource( 2 )
|
||||
script = ExtResource( "2" )
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="StaticArena"]
|
||||
collision_layer = 2147483651
|
||||
collision_mask = 279045
|
||||
physics_material_override = SubResource( 1 )
|
||||
physics_material_override = SubResource( "1" )
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="StaticArena/StaticBody3D"]
|
||||
width = 100.0
|
||||
height = 4.32824
|
||||
depth = 100.0
|
||||
material = SubResource( 2 )
|
||||
material = SubResource( "2" )
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticArena/StaticBody3D"]
|
||||
shape = SubResource( 3 )
|
||||
shape = SubResource( "3" )
|
||||
|
||||
[node name="StaticBody2" type="StaticBody3D" parent="StaticArena"]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 18.1689, 1.64214 )
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 18.1689, 1.64214)
|
||||
collision_layer = 2147483651
|
||||
collision_mask = 279045
|
||||
physics_material_override = SubResource( 1 )
|
||||
physics_material_override = SubResource( "1" )
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="StaticArena/StaticBody2"]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.5124 )
|
||||
width = 100.0
|
||||
height = 40.0
|
||||
depth = 10.0
|
||||
material = SubResource( 4 )
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.5124)
|
||||
material = SubResource( "4" )
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticArena/StaticBody2"]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.709 )
|
||||
shape = SubResource( 5 )
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.709)
|
||||
shape = SubResource( "5" )
|
||||
|
||||
[node name="StaticBody3" type="StaticBody3D" parent="StaticArena"]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 18.1689, 91.732 )
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 18.1689, 91.732)
|
||||
collision_layer = 2147483651
|
||||
collision_mask = 279045
|
||||
physics_material_override = SubResource( 1 )
|
||||
physics_material_override = SubResource( "1" )
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="StaticArena/StaticBody3"]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.5124 )
|
||||
width = 100.0
|
||||
height = 40.0
|
||||
depth = 10.0
|
||||
material = SubResource( 4 )
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.5124)
|
||||
material = SubResource( "4" )
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticArena/StaticBody3"]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.709 )
|
||||
shape = SubResource( 5 )
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.709)
|
||||
shape = SubResource( "5" )
|
||||
|
||||
[node name="StaticBody4" type="StaticBody3D" parent="StaticArena"]
|
||||
transform = Transform3D( -1.62921e-07, 0, -1, 0, 1, 0, 1, 0, -1.62921e-07, -1.90218, 18.1689, 0.572887 )
|
||||
transform = Transform3D(-1.62921e-07, 0, -1, 0, 1, 0, 1, 0, -1.62921e-07, -1.90218, 18.1689, 0.572887)
|
||||
collision_layer = 2147483651
|
||||
collision_mask = 279045
|
||||
physics_material_override = SubResource( 1 )
|
||||
physics_material_override = SubResource( "1" )
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="StaticArena/StaticBody4"]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.13509, -46.5124 )
|
||||
width = 100.0
|
||||
height = 40.0
|
||||
depth = 10.0
|
||||
material = SubResource( 4 )
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.13509, -46.5124)
|
||||
material = SubResource( "4" )
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticArena/StaticBody4"]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.709 )
|
||||
shape = SubResource( 5 )
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.709)
|
||||
shape = SubResource( "5" )
|
||||
|
||||
[node name="StaticBody5" type="StaticBody3D" parent="StaticArena"]
|
||||
transform = Transform3D( -1.62921e-07, 0, -1, 0, 1, 0, 1, 0, -1.62921e-07, -92.1931, 18.8845, 0.814518 )
|
||||
transform = Transform3D(-1.62921e-07, 0, -1, 0, 1, 0, 1, 0, -1.62921e-07, -92.1931, 18.8845, 0.814518)
|
||||
collision_layer = 2147483651
|
||||
collision_mask = 279045
|
||||
physics_material_override = SubResource( 1 )
|
||||
physics_material_override = SubResource( "1" )
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="StaticArena/StaticBody5"]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.5124 )
|
||||
width = 100.0
|
||||
height = 40.0
|
||||
depth = 10.0
|
||||
material = SubResource( 4 )
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.5124)
|
||||
material = SubResource( "4" )
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticArena/StaticBody5"]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.709 )
|
||||
shape = SubResource( 5 )
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.709)
|
||||
shape = SubResource( "5" )
|
||||
|
||||
[node name="StaticBody6" type="StaticBody3D" parent="StaticArena"]
|
||||
transform = Transform3D( 0.998532, 0.013617, -0.0524264, 0, 0.967885, 0.251394, 0.054166, -0.251025, 0.966464, -16.8315, 7.76313, 0 )
|
||||
transform = Transform3D(0.998532, 0.013617, -0.0524264, 0, 0.967885, 0.251394, 0.054166, -0.251025, 0.966464, -16.8315, 7.76313, 0)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticArena/StaticBody6"]
|
||||
shape = SubResource( 6 )
|
||||
shape = SubResource( "6" )
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="StaticArena/StaticBody6"]
|
||||
width = 23.9394
|
||||
depth = 44.6359
|
||||
|
||||
[node name="StaticBody7" type="StaticBody3D" parent="StaticArena"]
|
||||
transform = Transform3D( -0.638995, 0.193375, -0.744507, 0, 0.967885, 0.251394, 0.769211, 0.16064, -0.618474, 10.0702, 7.03413, 0 )
|
||||
transform = Transform3D(-0.638995, 0.193375, -0.744507, 0, 0.967885, 0.251394, 0.769211, 0.16064, -0.618474, 10.0702, 7.03413, 0)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticArena/StaticBody7"]
|
||||
transform = Transform3D( 1, -9.31323e-10, 0, 0, 1, 1.49012e-08, 3.72529e-09, 1.49012e-08, 1, 0, 0, 0 )
|
||||
shape = SubResource( 7 )
|
||||
transform = Transform3D(1, -9.31323e-10, 0, 0, 1, 1.49012e-08, 3.72529e-09, 1.49012e-08, 1, 0, 0, 0)
|
||||
shape = SubResource( "7" )
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="StaticArena/StaticBody7"]
|
||||
width = 23.9394
|
||||
depth = 44.6359
|
||||
|
||||
[node name="StaticBody8" type="StaticBody3D" parent="StaticArena"]
|
||||
transform = Transform3D( -0.314953, 0.2386, -0.918626, 0, 0.967885, 0.251394, 0.949107, 0.0791774, -0.304838, 10.0702, 7.03413, 24.278 )
|
||||
transform = Transform3D(-0.314953, 0.2386, -0.918626, 0, 0.967885, 0.251394, 0.949107, 0.0791774, -0.304838, 10.0702, 7.03413, 24.278)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticArena/StaticBody8"]
|
||||
transform = Transform3D( 1, -9.31323e-10, 0, 0, 1, 1.49012e-08, 3.72529e-09, 1.49012e-08, 1, 0, 0, 0 )
|
||||
shape = SubResource( 7 )
|
||||
transform = Transform3D(1, -9.31323e-10, 0, 0, 1, 1.49012e-08, 3.72529e-09, 1.49012e-08, 1, 0, 0, 0)
|
||||
shape = SubResource( "7" )
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="StaticArena/StaticBody8"]
|
||||
width = 23.9394
|
||||
depth = 44.6359
|
||||
|
||||
[node name="StaticBody9" type="StaticBody3D" parent="StaticArena"]
|
||||
transform = Transform3D( 0.289683, -0.599318, 0.746259, -0.123608, -0.796586, -0.591753, 0.949107, 0.0791774, -0.304838, 10.0702, 0.940654, -25.555 )
|
||||
transform = Transform3D(0.289683, -0.599318, 0.746259, -0.123608, -0.796586, -0.591753, 0.949107, 0.0791774, -0.304838, 10.0702, 0.940654, -25.555)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticArena/StaticBody9"]
|
||||
transform = Transform3D( 1, 7.45058e-09, 0, 1.49012e-08, 1, 4.84288e-08, 0, -3.1665e-08, 1, 0, 0, 0 )
|
||||
shape = SubResource( 7 )
|
||||
transform = Transform3D(1, 7.45058e-09, 0, 1.49012e-08, 1, 4.84288e-08, 0, -3.1665e-08, 1, 0, 0, 0)
|
||||
shape = SubResource( "7" )
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="StaticArena/StaticBody9"]
|
||||
width = 23.9394
|
||||
depth = 44.6359
|
||||
|
||||
[node name="Objects" type="Node3D" parent="."]
|
||||
|
||||
[node name="RigidDynamicBody3D" parent="Objects" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -8.50424, 17.1047, 14.7363 )
|
||||
[node name="RigidDynamicBody3D" parent="Objects" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.50424, 17.1047, 14.7363)
|
||||
|
||||
[node name="RigidBody2" parent="Objects" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 3.7864, 12.6031, 19.1751 )
|
||||
[node name="RigidBody2" parent="Objects" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.7864, 12.6031, 19.1751)
|
||||
|
||||
[node name="RigidBody3" parent="Objects" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -16.9896, 10.6319, 28.8764 )
|
||||
[node name="RigidBody3" parent="Objects" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.9896, 10.6319, 28.8764)
|
||||
|
||||
[node name="RigidBody4" parent="Objects" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -26.0866, 12.6031, -18.3703 )
|
||||
[node name="RigidBody4" parent="Objects" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -26.0866, 12.6031, -18.3703)
|
||||
|
||||
[node name="RigidBody5" parent="Objects" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 22.2505, 12.6031, -20.7732 )
|
||||
[node name="RigidBody5" parent="Objects" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 22.2505, 12.6031, -20.7732)
|
||||
|
||||
[node name="RigidBody6" parent="Objects" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 24.085, 12.6031, 8.2937 )
|
||||
[node name="RigidBody6" parent="Objects" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 24.085, 12.6031, 8.2937)
|
||||
|
||||
[node name="RigidBody7" parent="Objects" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 18.9278, 12.6031, 23.4173 )
|
||||
[node name="RigidBody7" parent="Objects" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18.9278, 12.6031, 23.4173)
|
||||
|
||||
[node name="RigidBody8" parent="Objects" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -3.85186, 24.8548, -9.87658 )
|
||||
[node name="RigidBody8" parent="Objects" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.85186, 24.8548, -9.87658)
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
transform = Transform3D( 0.922114, 0.23703, -0.305815, 0.0163102, 0.765871, 0.642787, 0.386575, -0.597711, 0.702354, -25.392, 55.117, 39.851 )
|
||||
transform = Transform3D(0.922114, 0.23703, -0.305815, 0.0163102, 0.765871, 0.642787, 0.386575, -0.597711, 0.702354, -25.392, 55.117, 39.851)
|
||||
current = true
|
||||
far = 200.0
|
||||
|
||||
@@ -201,12 +178,12 @@ far = 200.0
|
||||
|
||||
[node name="Cone" type="Node3D" parent="Joints"]
|
||||
|
||||
[node name="RigidBody2" parent="Joints/Cone" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -23.2888, 6.73046, 77.026 )
|
||||
[node name="RigidBody2" parent="Joints/Cone" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23.2888, 6.73046, 77.026)
|
||||
gravity_scale = -3.0
|
||||
|
||||
[node name="RigidDynamicBody3D" parent="Joints/Cone" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -23.2888, 15.3482, 19.1751 )
|
||||
[node name="RigidDynamicBody3D" parent="Joints/Cone" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23.2888, 15.3482, 19.1751)
|
||||
|
||||
[node name="ConeTwistJoint3D" type="ConeTwistJoint3D" parent="Joints/Cone"]
|
||||
nodes/node_a = NodePath("../RigidDynamicBody3D")
|
||||
@@ -214,12 +191,12 @@ nodes/node_b = NodePath("../RigidBody2")
|
||||
|
||||
[node name="Generic" type="Node3D" parent="Joints"]
|
||||
|
||||
[node name="RigidDynamicBody3D" parent="Joints/Generic" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -23.2888, 33.1278, 67.0796 )
|
||||
[node name="RigidDynamicBody3D" parent="Joints/Generic" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23.2888, 33.1278, 67.0796)
|
||||
gravity_scale = -3.0
|
||||
|
||||
[node name="RigidBody2" parent="Joints/Generic" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -23.2888, 33.1278, -0.445078 )
|
||||
[node name="RigidBody2" parent="Joints/Generic" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23.2888, 33.1278, -0.445078)
|
||||
|
||||
[node name="Generic6DOFJoint3D" type="Generic6DOFJoint3D" parent="Joints/Generic"]
|
||||
nodes/node_a = NodePath("../RigidDynamicBody3D")
|
||||
@@ -227,12 +204,12 @@ nodes/node_b = NodePath("../RigidBody2")
|
||||
|
||||
[node name="Hinge" type="Node3D" parent="Joints"]
|
||||
|
||||
[node name="RigidDynamicBody3D" parent="Joints/Hinge" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 18.6153, 33.1278, 59.2096 )
|
||||
[node name="RigidDynamicBody3D" parent="Joints/Hinge" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18.6153, 33.1278, 59.2096)
|
||||
gravity_scale = -3.0
|
||||
|
||||
[node name="RigidBody2" parent="Joints/Hinge" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 8.17695, 33.1278, 19.1751 )
|
||||
[node name="RigidBody2" parent="Joints/Hinge" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.17695, 33.1278, 19.1751)
|
||||
|
||||
[node name="HingeJoint3D" type="HingeJoint3D" parent="Joints/Hinge"]
|
||||
nodes/node_a = NodePath("../RigidDynamicBody3D")
|
||||
@@ -240,12 +217,12 @@ nodes/node_b = NodePath("../RigidBody2")
|
||||
|
||||
[node name="Pin" type="Node3D" parent="Joints"]
|
||||
|
||||
[node name="RigidDynamicBody3D" parent="Joints/Pin" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -23.2888, 4.83369, 116.28 )
|
||||
[node name="RigidDynamicBody3D" parent="Joints/Pin" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23.2888, 4.83369, 116.28)
|
||||
gravity_scale = -3.0
|
||||
|
||||
[node name="RigidBody2" parent="Joints/Pin" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -23.2888, 18.4589, 10.7729 )
|
||||
[node name="RigidBody2" parent="Joints/Pin" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23.2888, 18.4589, 10.7729)
|
||||
|
||||
[node name="PinJoint3D" type="PinJoint3D" parent="Joints/Pin"]
|
||||
nodes/node_a = NodePath("../RigidDynamicBody3D")
|
||||
@@ -253,12 +230,12 @@ nodes/node_b = NodePath("../RigidBody2")
|
||||
|
||||
[node name="Slider" type="Node3D" parent="Joints"]
|
||||
|
||||
[node name="RigidDynamicBody3D" parent="Joints/Slider" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -23.2888, 17.7427, 19.1751 )
|
||||
[node name="RigidDynamicBody3D" parent="Joints/Slider" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23.2888, 17.7427, 19.1751)
|
||||
gravity_scale = -3.0
|
||||
|
||||
[node name="RigidBody2" parent="Joints/Slider" instance=ExtResource( 3 )]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -33.3355, 16.2845, 19.1751 )
|
||||
[node name="RigidBody2" parent="Joints/Slider" instance=ExtResource( "3" )]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -33.3355, 16.2845, 19.1751)
|
||||
|
||||
[node name="SliderJoint3D" type="SliderJoint3D" parent="Joints/Slider"]
|
||||
nodes/node_a = NodePath("../RigidDynamicBody3D")
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://ds8d85dwfnxpq"]
|
||||
|
||||
[ext_resource path="res://Physics/3D/RigidBody3D.gd" type="Script" id=1]
|
||||
[ext_resource type="Script" path="res://Physics/3D/RigidBody3D.gd" id="1"]
|
||||
|
||||
[sub_resource type="SphereShape3D" id=1]
|
||||
[sub_resource type="SphereShape3D" id="1"]
|
||||
|
||||
[node name="RigidDynamicBody3D" type="RigidDynamicBody3D"]
|
||||
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -23.2888, 33.1278, 19.1751 )
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23.2888, 33.1278, 19.1751)
|
||||
gravity_scale = 5.0
|
||||
continuous_cd = true
|
||||
linear_velocity = Vector3( 0, 5, 0 )
|
||||
script = ExtResource( 1 )
|
||||
linear_velocity = Vector3(0, 5, 0)
|
||||
script = ExtResource( "1" )
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D( 5, 0, 0, 0, 5, 0, 0, 0, 5, 0, 0, 0 )
|
||||
shape = SubResource( 1 )
|
||||
transform = Transform3D(5, 0, 0, 0, 5, 0, 0, 0, 5, 0, 0, 0)
|
||||
shape = SubResource( "1" )
|
||||
|
||||
[node name="CSGSphere3D" type="CSGSphere3D" parent="CollisionShape3D"]
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
extends Node
|
||||
|
||||
# Script first adds nodes to scene, then choose some random nodes and reparents
|
||||
# them or delete and replace with new ones
|
||||
# This is not really reproducible, but crashes find by this tool should be quite easy to recreate
|
||||
|
||||
## Algorithm
|
||||
# - Add multiple nodes to scene
|
||||
# - Set name to each
|
||||
# - In _process
|
||||
# - Get random node
|
||||
# - Detach it from its parent
|
||||
# - Play with a russian roulette:
|
||||
# - If node will be deleted, be sure to get list of its all children and then
|
||||
# replace all with new nodes(change also name) and old remove with queue_free()
|
||||
# - Get another random node
|
||||
# - If nodes are the same, add node to root one(cannot set self as self parent) and repeat steps
|
||||
# - If second node is child of first, add first node to root one(prevents from memory leaks due invalid reparenting)
|
||||
# - At the end add first random node as child of second
|
||||
|
||||
var number_of_nodes: int = 0
|
||||
|
||||
# Collected nodes
|
||||
var collected_nodes: Array = []
|
||||
# Disabled nodes which won't be used
|
||||
var disabled_classes: Array = [
|
||||
"NavigationAgent2D",
|
||||
"NavigationAgent3D",
|
||||
"GPUParticlesCollisionHeightField",
|
||||
"ReflectionProbe", # Cause errors, not sure about it
|
||||
# Creating them is really slow in Godot 4.0
|
||||
"ColorPicker",
|
||||
"FileDialog",
|
||||
"ColorPickerButton",
|
||||
"PhysicalSkyMaterial",
|
||||
"ProceduralSkyMaterial"
|
||||
]
|
||||
|
||||
var debug_enabled: bool = false
|
||||
|
||||
|
||||
func collect() -> void:
|
||||
var classes: Array = ClassDB.get_class_list()
|
||||
classes.sort()
|
||||
for name_of_class in classes:
|
||||
if ClassDB.is_parent_class(name_of_class, "Node"):
|
||||
if name_of_class.find("Editor") != -1: # We don't want to test editor nodes
|
||||
continue
|
||||
if disabled_classes.has(name_of_class): # Class is disabled
|
||||
continue
|
||||
if ClassDB.can_instantiate(name_of_class): # Only instantable nodes can be used
|
||||
collected_nodes.append(name_of_class)
|
||||
|
||||
if debug_enabled:
|
||||
var to_print: String = "DEBUG: List of classes used in ReparentingDeleting scene:\n"
|
||||
to_print += "DEBUG: ["
|
||||
for index in range(classes.size()):
|
||||
to_print += '"' + classes[index] + '"'
|
||||
if index != classes.size() - 1:
|
||||
to_print += ", "
|
||||
print(to_print)
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
seed(405)
|
||||
collect()
|
||||
number_of_nodes = max(collected_nodes.size(), 200) # Use at least all nodes, or more if you want(168 is probably number of all nodes)
|
||||
for i in range(number_of_nodes):
|
||||
var index = i
|
||||
if i >= collected_nodes.size(): # Wrap values
|
||||
index = i % collected_nodes.size()
|
||||
|
||||
var child: Node = ClassDB.instantiate(collected_nodes[index])
|
||||
child.set_name("Special Node " + str(i))
|
||||
add_child(child)
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
# assert(Performance.get_monitor(Performance.OBJECT_ORPHAN_NODE_COUNT) == 0) # Don't work good when instancing more than 1 scene, because node queued for deleting
|
||||
|
||||
var choosen_node: Node
|
||||
var parent_of_node: Node
|
||||
for i in range(5):
|
||||
var number: String = "Special Node " + str(randi() % number_of_nodes)
|
||||
choosen_node = find_node(number, true, false)
|
||||
parent_of_node = choosen_node.get_parent()
|
||||
|
||||
var random_node = find_node("Special Node " + str(randi() % number_of_nodes), true, false)
|
||||
parent_of_node.remove_child(choosen_node)
|
||||
|
||||
if randi() % 6 == 0: # 16% chance to remove node with children
|
||||
var names_to_remove: Array = find_all_special_children_names(choosen_node)
|
||||
for name_to_remove in names_to_remove:
|
||||
var node: Node = ClassDB.instantiate(collected_nodes[randi() % collected_nodes.size()])
|
||||
node.set_name(name_to_remove)
|
||||
add_child(node)
|
||||
choosen_node.queue_free()
|
||||
continue
|
||||
|
||||
if choosen_node.find_node(random_node.get_name(), true, false) != null: # Cannot set as node parent one of its child
|
||||
add_child(choosen_node)
|
||||
continue
|
||||
if choosen_node == random_node: # Do not reparent node to self
|
||||
add_child(choosen_node)
|
||||
continue
|
||||
random_node.add_child(choosen_node)
|
||||
|
||||
|
||||
# Finds recusivelly all child nodes which will be also removed to be able to add
|
||||
# exactly same number of nodes in replacement.
|
||||
func find_all_special_children_names(node: Node) -> Array:
|
||||
var array: Array = []
|
||||
array.append(node.get_name())
|
||||
for child in node.get_children():
|
||||
if String(child.get_name()).begins_with("Special Node"):
|
||||
array.append_array(find_all_special_children_names(child))
|
||||
|
||||
return array
|
||||
@@ -1,6 +0,0 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://ReparentingDeleting/ReparentingDeleting.gd" type="Script" id=1]
|
||||
|
||||
[node name="ReparentingDeleting" type="Node"]
|
||||
script = ExtResource( 1 )
|
||||
@@ -6,6 +6,3 @@
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( "1" )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture2D"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bkhft4ksf6bm8"
|
||||
path.s3tc="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.s3tc.stex"
|
||||
path.etc2="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.etc2.stex"
|
||||
path.s3tc="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc", "etc2"],
|
||||
"vram_texture": true
|
||||
@@ -13,7 +13,7 @@ metadata={
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.png"
|
||||
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.s3tc.stex", "res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.etc2.stex"]
|
||||
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.s3tc.ctex", "res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
@@ -23,15 +23,13 @@ compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
compress/streamed=false
|
||||
mipmaps/generate=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/hdr_as_srgb=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
detect_3d/compress_to=0
|
||||
|
||||
Reference in New Issue
Block a user