Added item resources

This commit is contained in:
Eduard Urbach 2024-02-11 14:46:58 +01:00
parent 32dbaa3673
commit e9daf1a8a9
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0
6 changed files with 146 additions and 1 deletions

5
client/item/Item.gd Normal file
View File

@ -0,0 +1,5 @@
class_name Item
extends Resource
@export var name: String
@export var scene: PackedScene

View File

@ -0,0 +1,48 @@
[gd_scene load_steps=7 format=3 uid="uid://dl4vcp04t8iyr"]
[ext_resource type="Texture2D" uid="uid://c3wx3cgn8x62m" path="res://assets/particles/particles-single.png" id="1_hhudy"]
[sub_resource type="Curve" id="Curve_dga57"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), -1.66657, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_mxji2"]
curve = SubResource("Curve_dga57")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_uyeuh"]
emission_shape = 1
emission_sphere_radius = 0.25
gravity = Vector3(0, 0, 0)
radial_accel_min = -0.5
radial_accel_max = -0.25
tangential_accel_min = 0.25
tangential_accel_max = 0.5
scale_min = 0.1
scale_max = 0.2
color = Color(1, 0.713726, 0.862745, 1)
alpha_curve = SubResource("CurveTexture_mxji2")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_gl2xl"]
transparency = 1
blend_mode = 1
cull_mode = 2
shading_mode = 0
specular_mode = 2
vertex_color_use_as_albedo = true
albedo_texture = ExtResource("1_hhudy")
disable_receive_shadows = true
[sub_resource type="QuadMesh" id="QuadMesh_6nr8a"]
material = SubResource("StandardMaterial3D_gl2xl")
size = Vector2(0.1, 0.1)
[node name="Soul" type="Node3D"]
[node name="GPUParticles3D" type="GPUParticles3D" parent="."]
cast_shadow = 0
amount = 2000
lifetime = 0.5
transform_align = 1
trail_lifetime = 0.5
process_material = SubResource("ParticleProcessMaterial_uyeuh")
draw_pass_1 = SubResource("QuadMesh_6nr8a")

View File

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Item" load_steps=3 format=3 uid="uid://cctcou3pxuxab"]
[ext_resource type="PackedScene" uid="uid://dl4vcp04t8iyr" path="res://item/soul/Soul.tscn" id="1_bbwtc"]
[ext_resource type="Script" path="res://item/Item.gd" id="1_otojt"]
[resource]
script = ExtResource("1_otojt")
name = "Soul"
scene = ExtResource("1_bbwtc")

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=13 format=3 uid="uid://dagn5bf7ou3sd"]
[gd_scene load_steps=14 format=3 uid="uid://dagn5bf7ou3sd"]
[ext_resource type="PackedScene" uid="uid://cch67vqpsmtej" path="res://ui/debug/DebugLabel.tscn" id="1_7s8uu"]
[ext_resource type="Script" path="res://ui/UI.gd" id="1_l5b6o"]
@ -12,6 +12,7 @@
[ext_resource type="Script" path="res://ui/debug/DownloadLabel.gd" id="8_ogt38"]
[ext_resource type="Script" path="res://ui/connect/ConnectPanel.gd" id="11_cwl0t"]
[ext_resource type="PackedScene" uid="uid://bqpbrju7mc7d5" path="res://ui/settings/Settings.tscn" id="11_rt7sl"]
[ext_resource type="PackedScene" uid="uid://y6kdpmp5glv0" path="res://ui/inventory/Inventory.tscn" id="13_1fc2b"]
[node name="UI" type="Control"]
layout_mode = 3
@ -131,6 +132,14 @@ text = "Connecting..."
[node name="Settings" parent="Canvas" instance=ExtResource("11_rt7sl")]
visible = false
[node name="Inventory" parent="Canvas" instance=ExtResource("13_1fc2b")]
visible = false
anchors_preset = -1
anchor_left = 0.25
anchor_top = 0.25
anchor_right = 0.75
anchor_bottom = 0.75
[connection signal="focus_entered" from="Canvas/BottomLeft/Chat/ChatInput" to="Canvas/BottomLeft/Chat/ChatInput" method="_on_focus_entered"]
[connection signal="focus_exited" from="Canvas/BottomLeft/Chat/ChatInput" to="Canvas/BottomLeft/Chat/ChatInput" method="_on_focus_exited"]
[connection signal="text_submitted" from="Canvas/BottomLeft/Chat/ChatInput" to="Canvas/BottomLeft/Chat/ChatInput" method="_on_text_submitted"]

View File

@ -0,0 +1,65 @@
[gd_scene load_steps=2 format=3 uid="uid://y6kdpmp5glv0"]
[ext_resource type="PackedScene" uid="uid://bjjxxh6o405ci" path="res://ui/inventory/InventorySlot.tscn" id="1_s830e"]
[node name="Inventory" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="PanelContainer" type="PanelContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
layout_mode = 2
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Inventory"
horizontal_alignment = 1
[node name="GridContainer" type="GridContainer" parent="PanelContainer/VBoxContainer"]
layout_mode = 2
columns = 5
[node name="InventorySlot" parent="PanelContainer/VBoxContainer/GridContainer" instance=ExtResource("1_s830e")]
layout_mode = 2
[node name="InventorySlot2" parent="PanelContainer/VBoxContainer/GridContainer" instance=ExtResource("1_s830e")]
layout_mode = 2
[node name="InventorySlot3" parent="PanelContainer/VBoxContainer/GridContainer" instance=ExtResource("1_s830e")]
layout_mode = 2
[node name="InventorySlot4" parent="PanelContainer/VBoxContainer/GridContainer" instance=ExtResource("1_s830e")]
layout_mode = 2
[node name="InventorySlot5" parent="PanelContainer/VBoxContainer/GridContainer" instance=ExtResource("1_s830e")]
layout_mode = 2
[node name="InventorySlot6" parent="PanelContainer/VBoxContainer/GridContainer" instance=ExtResource("1_s830e")]
layout_mode = 2
[node name="InventorySlot7" parent="PanelContainer/VBoxContainer/GridContainer" instance=ExtResource("1_s830e")]
layout_mode = 2
[node name="InventorySlot8" parent="PanelContainer/VBoxContainer/GridContainer" instance=ExtResource("1_s830e")]
layout_mode = 2
[node name="InventorySlot9" parent="PanelContainer/VBoxContainer/GridContainer" instance=ExtResource("1_s830e")]
layout_mode = 2
[node name="InventorySlot10" parent="PanelContainer/VBoxContainer/GridContainer" instance=ExtResource("1_s830e")]
layout_mode = 2

View File

@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=3 uid="uid://bjjxxh6o405ci"]
[ext_resource type="Texture2D" uid="uid://biplb56hj51h7" path="res://ui/icon.svg" id="1_0whqe"]
[node name="InventorySlot" type="PanelContainer"]
[node name="TextureRect" type="TextureRect" parent="."]
layout_mode = 2
texture = ExtResource("1_0whqe")