First adjustments to the Entity System to make it work with different types
This commit is contained in:
@@ -0,0 +1,124 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://cxvdb2w1sxui4"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bo2jik2jtuqlw" path="res://scripts/CSharp/Common/SceneManagement/SceneTransitionThreaded.cs" id="1_e0bkc"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_t7str"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("SceneFadeAnimation/ColorRect:color")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("SceneFadeAnimation/ColorRect:mouse_filter")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [2]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_e43hv"]
|
||||
resource_name = "fadeIn"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("SceneFadeAnimation/ColorRect:color")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.966667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("SceneFadeAnimation/ColorRect:mouse_filter")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.2),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 1,
|
||||
"values": [2, 0]
|
||||
}
|
||||
tracks/2/type = "method"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath(".")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0.966667),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"values": [{
|
||||
"args": [],
|
||||
"method": &"OnFadeInCompletedThreaded"
|
||||
}]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_d3jfo"]
|
||||
resource_name = "fadeOut"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("SceneFadeAnimation/ColorRect:color")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.966667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("SceneFadeAnimation/ColorRect:mouse_filter")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0.0333333, 0.966667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 1,
|
||||
"values": [0, 2]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5o782"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_t7str"),
|
||||
&"fadeIn": SubResource("Animation_e43hv"),
|
||||
&"fadeOut": SubResource("Animation_d3jfo")
|
||||
}
|
||||
|
||||
[node name="SceneTransition" type="CanvasLayer" node_paths=PackedStringArray("animationPlayer")]
|
||||
layer = 100
|
||||
script = ExtResource("1_e0bkc")
|
||||
animationPlayer = NodePath("SceneFadeAnimation")
|
||||
|
||||
[node name="SceneFadeAnimation" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_5o782")
|
||||
}
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="SceneFadeAnimation"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
color = Color(1, 1, 1, 0)
|
||||
@@ -0,0 +1,15 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://hdfejdnmp8sl"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://umop2b1m1qm8" path="res://scripts/CSharp/GameEntity/Management/EntityManager.cs" id="1_2bwns"]
|
||||
[ext_resource type="Script" uid="uid://bogqp274y1pgr" path="res://scripts/CSharp/GameEntity/Management/EntityNodeCreator.cs" id="2_8m173"]
|
||||
[ext_resource type="PackedScene" uid="uid://sbf12hin4kes" path="res://prefabs/Interactables/trash_object.tscn" id="3_v3vdc"]
|
||||
|
||||
[node name="EntityManager" type="Node" node_paths=PackedStringArray("_nodeCreator")]
|
||||
script = ExtResource("1_2bwns")
|
||||
_nodeCreator = NodePath("EntityCreator")
|
||||
|
||||
[node name="EntityCreator" type="Node" parent="."]
|
||||
script = ExtResource("2_8m173")
|
||||
_entityPrefabs = Dictionary[String, PackedScene]({
|
||||
"TrashEntity": ExtResource("3_v3vdc")
|
||||
})
|
||||
Reference in New Issue
Block a user