9.28上午

This commit is contained in:
TsubakiLoL 2024-09-28 12:04:15 +08:00
parent d581ba195c
commit 8049c6c5d8
4 changed files with 100 additions and 1 deletions

View File

@ -67,8 +67,27 @@ var system_game_data:Dictionary={
"unlock_character":["test_character_01","test_character_02"],
#全局物品
"item":[]
}
#将仓库内的装备数据装备到角色身上,同时删除仓库数据,并为角色添加装饰器,
#0饰品
func add_character_equipment_emblish(equip_pos:int,euqip_data:int):
pass
#将角色装备卸下,同时将装备数据数据添加到仓库,并为角色添加装饰器
func clear_character_equipment_emblish(equip_pos:int):
pass
#向全局仓库添加
func add_item_to_global(item_data:Dictionary,num:int):
pass
#向当前游戏数据添加item
func add_item_to_local(item_data:Dictionary,num:int):
pass
var now_game_data:Dictionary={
"character_data":{

View File

@ -1,5 +1,62 @@
{
"item_01":{
"type":0,
"price":100,
"quality":0,
"name":"测试饰品",
"material":{
}
},
"item_02":{
"type":1,
"price":100,
"quality":0,
"name":"测试手部装备",
"material":{
}
},
"item_03":{
"type":2,
"price":100,
"quality":0,
"name":"测试身体",
"material":{
}
},
"item_04":{
"type":3,
"price":100,
"quality":0,
"name":"测试头部",
"material":{
}
},
"item_05":{
"type":4,
"price":100,
"quality":0,
"name":"小刀",
"material":{
}
},
"item_06":{
"type":5,
"price":100,
"quality":0,
"name":"绷带",
"material":{
}
}
}

View File

@ -0,0 +1,20 @@
extends Label
@export var type:int=0
@export var texture:TextureRect
var item_data:Dictionary
func _can_drop_data(at_position: Vector2, data: Variant) -> bool:
if data.has("type") and data["type"]==type:
return true
else:
return false
func _drop_data(at_position: Vector2, data: Variant) -> void:
if item_data!=null:
pass
item_data=data
pass

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=60 format=3 uid="uid://chh7gr3qbkr8u"]
[gd_scene load_steps=61 format=3 uid="uid://chh7gr3qbkr8u"]
[ext_resource type="Script" path="res://scene/basic_message.gd" id="1_0470d"]
[ext_resource type="Texture2D" uid="uid://dygka5vk5qdhs" path="res://res/ui/ui_005_basic_message/tuceng2.png" id="1_vhe21"]
@ -38,6 +38,7 @@
[ext_resource type="Texture2D" uid="uid://c30tlsdim4ac6" path="res://res/ui/ui_009_skill_config/tuceng298.png" id="33_hd2fi"]
[ext_resource type="PackedScene" uid="uid://cg3ahgbl85d65" path="res://scene/skill_config_card_up.tscn" id="34_1tfp4"]
[ext_resource type="Texture2D" uid="uid://17b158yqgl3g" path="res://res/ui/ui_009_skill_config/juxing521.png" id="34_m5kco"]
[ext_resource type="Script" path="res://scene/basic_mes_item_drop_data.gd" id="35_uq1fu"]
[ext_resource type="PackedScene" uid="uid://bui33cht0ni46" path="res://scene/skill_config_card_down.tscn" id="36_kc577"]
[ext_resource type="Texture2D" uid="uid://on4d6mq1giid" path="res://res/ui/ui_009_skill_config/tuceng294.png" id="37_uftd4"]
[ext_resource type="Texture2D" uid="uid://bsy0yv6edtsmw" path="res://res/ui/ui_009_skill_config/tuceng1.png" id="38_xp82q"]
@ -1791,6 +1792,7 @@ size_flags_vertical = 0
texture = ExtResource("38_xp82q")
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer2/TextureRect3"]
unique_name_in_owner = true
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
@ -1816,6 +1818,7 @@ theme_override_font_sizes/font_size = 31
text = "头部"
horizontal_alignment = 1
vertical_alignment = 2
script = ExtResource("35_uq1fu")
metadata/_edit_use_anchors_ = true
[node name="TextureRect4" type="NinePatchRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer2"]