Rewrote entity system
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://yhtpoum3eek7"]
|
||||
[gd_scene load_steps=11 format=3 uid="uid://yhtpoum3eek7"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ixwikdguyhf0" path="res://scripts/Entity/RosaController.gd" id="1_3g383"]
|
||||
[ext_resource type="Script" uid="uid://ixwikdguyhf0" path="res://scripts/Entity/Rosa.gd" id="1_r5ufg"]
|
||||
[ext_resource type="Script" uid="uid://dtjjqp2atjyhr" path="res://scripts/Entity/Entity.gd" id="1_rvn3n"]
|
||||
[ext_resource type="Script" uid="uid://jd50n00bo05y" path="res://scripts/Entity/RosaCamera.gd" id="2_tr66j"]
|
||||
[ext_resource type="Script" uid="uid://cjfcpi7sxentf" path="res://scripts/Entity/Component/EntityDirection.gd" id="2_vcxxc"]
|
||||
[ext_resource type="Shader" uid="uid://7h2axb2tsh17" path="res://shaders/NPC Shader.gdshader" id="3_j5vis"]
|
||||
[ext_resource type="Script" uid="uid://c5nfs0m6ua4eb" path="res://scripts/Entity/Component/EntityMovement.gd" id="4_7s3uq"]
|
||||
[ext_resource type="Texture2D" uid="uid://cofrgefp8e617" path="res://textures/human.png" id="4_rvn3n"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_ls7r8"]
|
||||
@@ -17,13 +20,34 @@ shader = ExtResource("3_j5vis")
|
||||
shader_parameter/npcTexture = ExtResource("4_rvn3n")
|
||||
shader_parameter/color = Color(1, 1, 1, 1)
|
||||
shader_parameter/frame = 0
|
||||
shader_parameter/direction = 1
|
||||
shader_parameter/direction = 2
|
||||
|
||||
[node name="Rosa" type="CharacterBody3D"]
|
||||
script = ExtResource("1_3g383")
|
||||
collision_layer = 2
|
||||
collision_mask = 258
|
||||
script = ExtResource("1_r5ufg")
|
||||
metadata/_custom_type_script = "uid://ixwikdguyhf0"
|
||||
|
||||
[node name="Entity" type="Node" parent="."]
|
||||
script = ExtResource("1_rvn3n")
|
||||
metadata/_custom_type_script = "uid://dtjjqp2atjyhr"
|
||||
|
||||
[node name="EntityDirection" type="Node" parent="Entity" node_paths=PackedStringArray("meshInstance")]
|
||||
script = ExtResource("2_vcxxc")
|
||||
meshInstance = NodePath("../../MeshInstance3D")
|
||||
direction = 2
|
||||
metadata/_custom_type_script = "uid://cjfcpi7sxentf"
|
||||
|
||||
[node name="EntityMoving" type="Node" parent="Entity" node_paths=PackedStringArray("characterBody", "entity", "entityDirection")]
|
||||
script = ExtResource("4_7s3uq")
|
||||
characterBody = NodePath("../..")
|
||||
entity = NodePath("..")
|
||||
entityDirection = NodePath("../EntityDirection")
|
||||
movementType = 0
|
||||
|
||||
[node name="Rosa Camera" type="Camera3D" parent="." node_paths=PackedStringArray("follow")]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.130388, 0.991463, 0, -0.991463, 0.130388, 0, 3.14994, 0.404846)
|
||||
current = true
|
||||
fov = 30.0
|
||||
script = ExtResource("2_tr66j")
|
||||
follow = NodePath("..")
|
||||
@@ -32,6 +56,6 @@ follow = NodePath("..")
|
||||
shape = SubResource("CapsuleShape3D_ls7r8")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.173648, 0.984808, 0, -0.984808, 0.173648, 0.00989294, 0, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 0.173648, 0.984808, 0, -0.984808, 0.173648, 0, 0, 0)
|
||||
mesh = SubResource("QuadMesh_dyaax")
|
||||
surface_material_override/0 = SubResource("ShaderMaterial_fegux")
|
||||
|
@@ -1,7 +1,10 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://dr4b2pmsknuhc"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://dr4b2pmsknuhc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d23qg1ovkbxst" path="res://scripts/Entity/BasicNPCEntity.gd" id="1_1muh7"]
|
||||
[ext_resource type="Shader" uid="uid://7h2axb2tsh17" path="res://shaders/NPC Shader.gdshader" id="1_xgcv1"]
|
||||
[ext_resource type="Script" uid="uid://dtjjqp2atjyhr" path="res://scripts/Entity/Entity.gd" id="2_ehu3x"]
|
||||
[ext_resource type="Script" uid="uid://cjfcpi7sxentf" path="res://scripts/Entity/Component/EntityDirection.gd" id="3_gyi1p"]
|
||||
[ext_resource type="Script" uid="uid://c5nfs0m6ua4eb" path="res://scripts/Entity/Component/EntityMovement.gd" id="4_3wesq"]
|
||||
[ext_resource type="Texture2D" uid="uid://cofrgefp8e617" path="res://textures/human.png" id="4_vo0ku"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_dw1sy"]
|
||||
@@ -16,10 +19,29 @@ shader = ExtResource("1_xgcv1")
|
||||
shader_parameter/npcTexture = ExtResource("4_vo0ku")
|
||||
shader_parameter/color = Color(0, 0.563816, 0, 1)
|
||||
shader_parameter/frame = 0
|
||||
shader_parameter/direction = 1
|
||||
shader_parameter/direction = 0
|
||||
|
||||
[node name="TestNpc" type="CharacterBody3D"]
|
||||
collision_layer = 2
|
||||
collision_mask = 258
|
||||
script = ExtResource("1_1muh7")
|
||||
metadata/_custom_type_script = "uid://d23qg1ovkbxst"
|
||||
|
||||
[node name="Entity" type="Node" parent="."]
|
||||
script = ExtResource("2_ehu3x")
|
||||
metadata/_custom_type_script = "uid://dtjjqp2atjyhr"
|
||||
|
||||
[node name="EntityDirection" type="Node" parent="Entity" node_paths=PackedStringArray("meshInstance")]
|
||||
script = ExtResource("3_gyi1p")
|
||||
meshInstance = NodePath("../../MeshInstance3D")
|
||||
metadata/_custom_type_script = "uid://cjfcpi7sxentf"
|
||||
|
||||
[node name="EntityMoving" type="Node" parent="Entity" node_paths=PackedStringArray("characterBody", "entity", "entityDirection")]
|
||||
script = ExtResource("4_3wesq")
|
||||
characterBody = NodePath("../..")
|
||||
entity = NodePath("..")
|
||||
entityDirection = NodePath("../EntityDirection")
|
||||
movementType = 2
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("CapsuleShape3D_dw1sy")
|
||||
|
@@ -32,11 +32,8 @@ environment = SubResource("Environment_nyivo")
|
||||
[node name="Rosa" parent="." instance=ExtResource("1_7b7hx")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.19857, 0.684572, 0.968477)
|
||||
|
||||
[node name="Green" parent="." node_paths=PackedStringArray("interactEvent") instance=ExtResource("2_cg1ph")]
|
||||
[node name="Green" parent="." instance=ExtResource("2_cg1ph")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.68747, 0.459578, -0.399262)
|
||||
interactEvent = NodePath("../Events/TestConversation")
|
||||
moveType = 1
|
||||
direction = 1
|
||||
|
||||
[node name="OmniLight3D" type="OmniLight3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7.20244, 3.80554)
|
||||
@@ -52,9 +49,13 @@ metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Building2" parent="Map" instance=ExtResource("4_brp0k")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.13514, 2.62692, -0.0984068)
|
||||
collision_layer = 256
|
||||
collision_mask = 2
|
||||
|
||||
[node name="Building" parent="Map" instance=ExtResource("4_brp0k")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.92766, 2.37929, -4.38178)
|
||||
collision_layer = 256
|
||||
collision_mask = 2
|
||||
|
||||
[node name="Events" type="Node" parent="."]
|
||||
|
||||
|
@@ -17,6 +17,8 @@ shader_parameter/tileset = ExtResource("2_3bnhs")
|
||||
size = Vector3(50, 0.1, 50)
|
||||
|
||||
[node name="Ground" type="StaticBody3D"]
|
||||
collision_layer = 256
|
||||
collision_mask = 2
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
|
@@ -8,7 +8,7 @@ anchors_preset = 12
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -60.0
|
||||
offset_top = -50.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
theme = ExtResource("1_wx4lp")
|
||||
|
Reference in New Issue
Block a user