9.27下午

This commit is contained in:
TsubakiLoL 2024-09-27 17:51:20 +08:00
parent 2a911ff837
commit d581ba195c
18 changed files with 721 additions and 456 deletions

View File

@ -16,6 +16,10 @@ var character_data:Dictionary
var map_json_path:String="res://json/map.json"
var map_data:Dictionary
var item_json_path:String="res://json/item.json"
var item_data
var npc_json_path:String="res://json/npc.json"
var npc_data:Dictionary
#角色修饰数据的存储路径
@ -60,7 +64,9 @@ var system_config_data:Dictionary={
}
var system_game_data:Dictionary={
"unlock_character":["test_character_01","test_character_02"]
"unlock_character":["test_character_01","test_character_02"],
#全局物品
"item":[]
}
var now_game_data:Dictionary={
@ -70,6 +76,8 @@ var now_game_data:Dictionary={
"script_data":{
},
#游戏内物品
"item":[],
"now_scene":"",
"difficulty":0,
"gold":9999,
@ -342,6 +350,14 @@ func load_card_data():
card_data=dictionary
pass
func load_item_data():
var file=FileAccess.open(item_json_path,FileAccess.READ)
var str=file.get_as_text()
var dictionary:Dictionary=JSON.parse_string(str)
for i in dictionary.keys():
dictionary[i]["id"]=i
item_data=dictionary
#获取图标
func get_texture(id:String):
if texture_data.has(id):
@ -413,3 +429,10 @@ func get_card_data(id:String):
return dictionary.duplicate(true)
else:
return null
func get_item_data(id:String):
if item_data.has(id):
var dictionary:Dictionary=item_data[id]
return dictionary.duplicate(true)
else:
return null

View File

@ -19,8 +19,8 @@ static func has_attribute(character_data:Dictionary):
else:
return [false,null]
func get_head(character_data:Dictionary):
static func get_head(character_data:Dictionary):
return character_data["head"]
pass
static func cacul_fight_attribute(character_data:Dictionary)->Dictionary:
@ -54,12 +54,12 @@ static func cacul_fight_attribute(character_data:Dictionary)->Dictionary:
pass
static func get_skin_now_use_data(character_data:Dictionary)->Dictionary:
return character_data["character"]["skin"][character_data["character"]["skin_now_use"]]
return character_data["skin"][character_data["skin_now_use"]]
static func get_character_name(character_data:Dictionary)->String:
return character_data["character"]["name"]
return character_data["name"]
pass
static func get_character_star_num(character_data:Dictionary)->int:
return int(character_data["character"]["star"])
return int(character_data["star"])
#修饰默认的角色数据,例如选择的皮肤,装备的卡片,选择的开局等
#修饰数据存储在玩家数据里用户通过Global获取的角色数据应是修饰后的数据更改角色时通过Global添加修饰器
@ -70,20 +70,25 @@ static func character_embellish(character_data:Dictionary,embellish_data:Diction
var res_data=character_data.duplicate(true)
#使用皮肤更改修饰
if embellish_data.has("skin"):
res_data["character"]["skin_now_use"]=int(embellish_data["skin"])
res_data["skin_now_use"]=int(embellish_data["skin"])
#"unclocked_start":[0],
#"start_now_use":0,
#开局更改修饰
if embellish_data.has("start"):
res_data["start_now_use"]=int(embellish_data["start"])
#解锁开局data应该是个int类型的Array
#解锁开局data应该是个int类型的Array因为json解析为float这里转换了
if embellish_data.has("unlock_start"):
var unlock_data:Array=embellish_data["unlock_start"]
for i in unlock_data:
if not float(i) in res_data["unlock_start"]:
#这里,下同
if not float(i) in res_data["unlocked_start"]:
res_data["unlocked_start"].append(float(i))
#解锁皮肤data应该是个int类型的Array
if embellish_data.has("unlock_skin"):
var unlock_data:Array=embellish_data["unlock_skin"]
for i in unlock_data:
if not float(i) in res_data["unlocked_skin"]:
res_data["unlocked_start"].append(float(i))
return res_data
static func get_initiative_value(character_data:Dictionary)->int:

View File

@ -1,19 +1,30 @@
{
"test_character_01":{
"character":{
"name":"朱雀院椿(测试1敏捷100)",
"head":"test_character_tsubaki_head",
"star":3,
"skin":[
{
"name":"皮肤1",
"skin_card_face":"test_character_tsubaki_head",
"card_face":"test_character_tsubaki",
"character":"test_character_tsubaki"
}
],
"skin_now_use":0
},
"name":"朱雀院椿1(敏捷100)",
"head":"test_character_tsubaki_head",
"star":3,
"skin":[
{
"name":"皮肤1",
"skin_card_face":"test_character_tsubaki_head",
"card_face":"test_character_tsubaki",
"character":"test_character_tsubaki"
},
{
"name":"皮肤2",
"skin_card_face":"test_character_tsubaki_head",
"card_face":"test_character_tsubaki",
"character":"test_character_tsubaki"
},
{
"name":"皮肤3",
"skin_card_face":"test_character_tsubaki_head",
"card_face":"test_character_tsubaki_head",
"character":"test_character_tsubaki_head"
}
],
"skin_now_use":0,
"unlocked_skin":[0,2],
"basic_mes":{
"type":0,
"place":"地点",
@ -67,17 +78,12 @@
],
"unclocked_start":[0,1],
"start_now_use":0,
"favor":[{
"name":"姐姐",
"value":100
}
],
"reputation":[
{
"name":"某地区",
"value":100
}
],
"favor":{
"姐姐":100
},
"reputation":{
"某地区":100
},
"card_as_NPC":[]
},
@ -87,21 +93,33 @@
"test_character_02":{
"character":{
"name":"朱雀院椿(测试2,敏捷50)",
"head":"test_character_tsubaki_head",
"star":3,
"skin":[
{
"name":"皮肤1",
"card_face":"test_character_tsubaki",
"character":"test_character_tsubaki"
}
],
"skin_now_use":0
},
"name":"朱雀院椿2(敏捷100)",
"head":"test_character_tsubaki_head",
"star":3,
"skin":[
{
"name":"皮肤1",
"skin_card_face":"test_character_tsubaki_head",
"card_face":"test_character_tsubaki",
"character":"test_character_tsubaki"
},
{
"name":"皮肤2",
"skin_card_face":"test_character_tsubaki_head",
"card_face":"test_character_tsubaki",
"character":"test_character_tsubaki"
},
{
"name":"皮肤3",
"skin_card_face":"test_character_tsubaki_head",
"card_face":"test_character_tsubaki_head",
"character":"test_character_tsubaki_head"
}
],
"skin_now_use":0,
"unlocked_skin":[0,2],
"basic_mes":{
"type":1,
"type":0,
"place":"地点",
"sex":0,
"race":"种族",
@ -110,7 +128,7 @@
},
"basic_attribute":{
"CON":100,
"AGI":50,
"AGI":100,
"INT":100,
"WIS":100,
"STR":100,
@ -131,18 +149,34 @@
"introduction":"鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果"
}
],
"favor":[{
"name":"姐姐",
"value":100
}
],
"reputation":[
"start":[
{
"name":"某地区",
"value":100
"name":"测试开局1",
"introduction":"测试开局1的介绍",
"add_buff":[],
"del_buff":[]
},
{
"name":"测试开局2",
"introduction":"测试开局2的介绍",
"add_buff":[],
"del_buff":[]
},
{
"name":"测试开局3",
"introduction":"测试开局3的介绍",
"add_buff":[],
"del_buff":[]
}
],
"unclocked_start":[0,1],
"start_now_use":0,
"favor":{
"姐姐":100
},
"reputation":{
"某地区":100
},
"card_as_NPC":[]
},
@ -154,21 +188,33 @@
"test_character_03":{
"character":{
"name":"朱雀院椿(测试3)",
"head":"test_character_tsubaki_head",
"star":3,
"skin":[
{
"name":"皮肤1",
"card_face":"test_character_tsubaki",
"character":"角色图片路径"
}
],
"skin_now_use":0
},
"name":"朱雀院椿3(敏捷100)",
"head":"test_character_tsubaki_head",
"star":3,
"skin":[
{
"name":"皮肤1",
"skin_card_face":"test_character_tsubaki_head",
"card_face":"test_character_tsubaki",
"character":"test_character_tsubaki"
},
{
"name":"皮肤2",
"skin_card_face":"test_character_tsubaki_head",
"card_face":"test_character_tsubaki",
"character":"test_character_tsubaki"
},
{
"name":"皮肤3",
"skin_card_face":"test_character_tsubaki_head",
"card_face":"test_character_tsubaki_head",
"character":"test_character_tsubaki_head"
}
],
"skin_now_use":0,
"unlocked_skin":[0,2],
"basic_mes":{
"type":2,
"type":0,
"place":"地点",
"sex":0,
"race":"种族",
@ -183,6 +229,7 @@
"STR":100,
"MND":100,
"LUC":100,
"AM":100
},
"special":[
@ -197,17 +244,35 @@
"introduction":"鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果"
}
],
"favor":[{
"name":"姐姐",
"value":100
"start":[
{
"name":"测试开局1",
"introduction":"测试开局1的介绍",
"add_buff":[],
"del_buff":[]
},
{
"name":"测试开局2",
"introduction":"测试开局2的介绍",
"add_buff":[],
"del_buff":[]
},
{
"name":"测试开局3",
"introduction":"测试开局3的介绍",
"add_buff":[],
"del_buff":[]
}
],
"reputation":[
{
"name":"某地区",
"value":100
}
]
"unclocked_start":[0,1],
"start_now_use":0,
"favor":{
"姐姐":100
},
"reputation":{
"某地区":100
},
"card_as_NPC":[]
},
}

5
json/item.json Normal file
View File

@ -0,0 +1,5 @@
{
"item_01":{
}
}

View File

@ -2,7 +2,7 @@ extends TextureRect
var is_mouse_enter:bool=false
signal click(data:Dictionary)
var data:Dictionary={
"texture":"test_character_tsubaki"
}
# Called when the node enters the scene tree for the first time.
func _ready() -> void:

View File

@ -0,0 +1,31 @@
extends TextureRect
class_name BasicMesSkinCard
signal click(skin:BasicMesSkinCard,ind:int)
var data:Dictionary
var index:int=0
var state:int=-2:
set(val):
if val!=state:
state=val
match val:
-1:
%lock.show()
%btn.disabled=true
0:
%lock.hide()
%btn.disabled=false
1:
%lock.hide()
%btn.disabled=true
pass
func set_data(_data:Dictionary):
data=_data
%skin_head.texture=Global.get_texture(data["skin_card_face"])
func _on_btn_pressed() -> void:
click.emit(self,index)
pass # Replace with function body.

View File

@ -1,15 +1,19 @@
[gd_scene load_steps=6 format=3 uid="uid://c20vbhv7jcv8n"]
[gd_scene load_steps=8 format=3 uid="uid://c20vbhv7jcv8n"]
[ext_resource type="Texture2D" uid="uid://b0souut27w2rq" path="res://res/ui/ui_005_basic_message/tuceng100.png" id="1_ilmd5"]
[ext_resource type="Script" path="res://scene/basic_mes_skin_card.gd" id="2_3k7er"]
[ext_resource type="Texture2D" uid="uid://bd8ihwl2g1igc" path="res://res/ui/ui_005_basic_message/tuceng101.png" id="2_iqkdj"]
[ext_resource type="Texture2D" uid="uid://da4mwbefqkahf" path="res://test/texture/tsubaki_1.png" id="3_c88qw"]
[ext_resource type="Texture2D" uid="uid://baou8kmprfpwt" path="res://res/ui/ui_005_basic_message/tuceng103.png" id="4_yka8x"]
[ext_resource type="Texture2D" uid="uid://jp6na74ed4yn" path="res://res/ui/ui_005_basic_message/tuceng102.png" id="5_p12ec"]
[ext_resource type="PackedScene" uid="uid://bdlo2wn4qnygv" path="res://scene/tool/tool_button.tscn" id="7_t5h7s"]
[node name="basic_mes_skin_card" type="TextureRect"]
offset_right = 40.0
offset_bottom = 40.0
focus_mode = 1
texture = ExtResource("1_ilmd5")
script = ExtResource("2_3k7er")
[node name="back" type="TextureRect" parent="."]
show_behind_parent = true
@ -33,6 +37,7 @@ grow_vertical = 2
texture = ExtResource("2_iqkdj")
[node name="skin_head" type="TextureRect" parent="mask2"]
unique_name_in_owner = true
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
@ -42,6 +47,7 @@ grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("3_c88qw")
expand_mode = 5
stretch_mode = 4
[node name="mask" type="TextureRect" parent="."]
show_behind_parent = true
@ -51,6 +57,7 @@ offset_bottom = 40.0
texture = ExtResource("4_yka8x")
[node name="lock" type="TextureRect" parent="."]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@ -58,4 +65,11 @@ anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("5_p12ec")
expand_mode = 1
stretch_mode = 3
[node name="btn" parent="." instance=ExtResource("7_t5h7s")]
unique_name_in_owner = true
layout_mode = 1
[connection signal="pressed" from="btn" to="." method="_on_btn_pressed"]

View File

@ -5,12 +5,15 @@ const SELECTED = preload("res://res/ui/ui_005_basic_message/selected.tres")
const BASIC_MES_SKIN_CARD = preload("res://scene/basic_mes_skin_card.tscn")
const START_CONFIG_MES = preload("res://scene/start_config_mes.tscn")
var data:Dictionary
##当前是在游戏外编辑还是在游戏内编辑
@export var is_in_game:bool=false
@onready var button_group:Array[Button]=[$VBoxContainer/TextureRect/HBoxContainer/Button, $VBoxContainer/TextureRect/HBoxContainer/Button2, $VBoxContainer/TextureRect/HBoxContainer/Button3, $VBoxContainer/TextureRect/HBoxContainer/Button4, $VBoxContainer/TextureRect/HBoxContainer/Button5, $VBoxContainer/TextureRect/HBoxContainer/Button6]
@onready var now_selected_button:Button=$VBoxContainer/TextureRect/HBoxContainer/Button
#面板关闭信号
signal close
var now_selected_mes:StartConfigMes
func init_from_data():
for i in %special_container.get_children():
i.queue_free()
for i in %ability_container.get_children():
@ -69,34 +72,35 @@ func init_from_data():
new_button.show_mes=i["introduction"]
new_button.text=i["name"]
%ability_container.add_child(new_button)
if data.has("character"):
var character_data=data["character"]
%character_name.text=character_data["name"]
var star_arr=%star_container.get_children()
var star_num:int=character_data["star"]
for i in star_arr.size():
if i<star_num:
star_arr[i].show()
else:
star_arr[i].hide()
%character_name.text=data["name"]
var star_arr=%star_container.get_children()
var star_num:int=data["star"]
for i in star_arr.size():
if i<star_num:
star_arr[i].show()
else:
star_arr[i].hide()
#关系
if data.has("favor"):
for i in %favor.get_children():
i.queue_free()
for i in data["favor"]:
for i in data["favor"].keys():
var new_label=Label.new()
new_label.text=i["name"]+":"+str(i["value"])
new_label.text=i+":"+str(data["favor"][i])
%favor.add_child(new_label)
new_label.add_theme_font_size_override("font_size",26)
#声望
if data.has("reputation"):
for i in %reputation.get_children():
i.queue_free()
for i in data["reputation"]:
for i in data["reputation"].keys():
var new_label=Label.new()
new_label.text=i["name"]+":"+str(i["value"])
new_label.text=i+":"+str(data["reputation"][i])
%reputation.add_child(new_label)
new_label.add_theme_font_size_override("font_size",26)
for i in %start_config_mes_add_pos.get_children():
i.queue_free()
##加载开局
var start_config_arr:Array=data["start"]
var start_now_use:int=data["start_now_use"]
var unclocked_start:Array=data["unclocked_start"]
@ -113,20 +117,49 @@ func init_from_data():
new_start.state=-1
new_start.set_data(start_config_arr[i])
new_start.click.connect(start_config_mes_click)
for i in %skin_card_add_pos.get_children():
i.queue_free()
var skin_data_arr:Array=data["skin"]
var skin_now_use:int=data["skin_now_use"]
var unlocked_skin=data["unlocked_skin"]
for i in skin_data_arr.size():
var new_skin_card:BasicMesSkinCard=BASIC_MES_SKIN_CARD.instantiate()
%skin_card_add_pos.add_child(new_skin_card)
new_skin_card.index=i
if i==skin_now_use:
new_skin_card.state=1
now_selected_skin_card=new_skin_card
elif float(i) in unlocked_skin:
new_skin_card.state=0
else:
new_skin_card.state=-1
new_skin_card.set_data(skin_data_arr[i])
new_skin_card.click.connect(skin_card_click)
pass
func start_config_mes_click(mes:StartConfigMes,ind:int):
now_selected_mes.state=0
mes.state=1
now_selected_mes=mes
#添加开局选择修饰
Global.add_character_embellich_data(data["id"],"start",ind)
data=Global.get_character_data(data["id"])
init_from_data()
pass
var now_selected_skin_card:BasicMesSkinCard
func connect_button():
for i in button_group.size():
button_group[i].pressed.connect(selected.bind(i))
#当第几个皮肤卡片被点击时
func skin_card_click(skin_index:int):
func skin_card_click(skin:BasicMesSkinCard,skin_index:int):
#添加皮肤修饰器
Global.add_character_embellich_data(data["id"],"skin",skin_index)
%character.texture=Global.get_texture(data["skin"][skin_index]["character"])
now_selected_skin_card.state=0
skin.state=1
now_selected_skin_card=skin
pass
@ -147,6 +180,12 @@ func selected(ind:int):
pass
func _ready() -> void:
if is_in_game:
$VBoxContainer/TextureRect/HBoxContainer/Button6.hide()
else:
$VBoxContainer/TextureRect/HBoxContainer/Button6.show()
pass
data=Global.get_character_data("test_character_01")
init_from_data()
connect_button()
@ -154,4 +193,5 @@ func _ready() -> void:
func _on_back_button_pressed() -> void:
self.hide()
close.emit()
pass # Replace with function body.

View File

@ -355,7 +355,7 @@ layout_mode = 2
size_flags_vertical = 3
size_flags_stretch_ratio = 939.0
theme_override_styles/panel = SubResource("StyleBoxEmpty_81i7t")
current_tab = 5
current_tab = 3
clip_tabs = false
tabs_visible = false
@ -1390,7 +1390,6 @@ size_flags_horizontal = 3
size_flags_vertical = 0
[node name="bag" type="MarginContainer" parent="VBoxContainer/TabContainer"]
visible = false
layout_mode = 2
theme_override_constants/margin_left = 54
theme_override_constants/margin_top = 8
@ -1640,6 +1639,342 @@ theme_override_font_sizes/font_size = 47
text = "9999"
vertical_alignment = 1
[node name="Control" type="Control" parent="VBoxContainer/TabContainer/bag/Panel"]
layout_mode = 1
anchor_left = -0.723205
anchor_top = -0.00337838
anchor_right = -0.0364204
anchor_bottom = 0.701577
metadata/_edit_use_anchors_ = true
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/TabContainer/bag/Panel/Control"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 27
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/separation = 31
[node name="TextureRect" type="NinePatchRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer"]
clip_contents = true
custom_minimum_size = Vector2(0, 127)
layout_mode = 2
size_flags_vertical = 10
texture = ExtResource("37_uftd4")
patch_margin_left = 12
patch_margin_top = 12
patch_margin_right = 12
patch_margin_bottom = 12
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer/TextureRect"]
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("25_m68h1")
expand_mode = 1
stretch_mode = 6
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer/TextureRect"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.913386
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
theme_override_font_sizes/font_size = 31
text = "饰品"
horizontal_alignment = 1
vertical_alignment = 2
metadata/_edit_use_anchors_ = true
[node name="TextureRect2" type="NinePatchRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer"]
clip_contents = true
custom_minimum_size = Vector2(0, 127)
layout_mode = 2
size_flags_vertical = 8
texture = ExtResource("37_uftd4")
patch_margin_left = 12
patch_margin_top = 12
patch_margin_right = 12
patch_margin_bottom = 12
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer/TextureRect2"]
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("25_m68h1")
expand_mode = 1
stretch_mode = 6
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer/TextureRect2"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.913386
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
theme_override_font_sizes/font_size = 31
text = "饰品"
horizontal_alignment = 1
vertical_alignment = 2
metadata/_edit_use_anchors_ = true
[node name="TextureRect3" type="NinePatchRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer"]
clip_contents = true
custom_minimum_size = Vector2(0, 127)
layout_mode = 2
size_flags_vertical = 8
texture = ExtResource("37_uftd4")
patch_margin_left = 12
patch_margin_top = 12
patch_margin_right = 12
patch_margin_bottom = 12
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer/TextureRect3"]
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("25_m68h1")
expand_mode = 1
stretch_mode = 6
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer/TextureRect3"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.913386
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
theme_override_font_sizes/font_size = 31
text = "手部"
horizontal_alignment = 1
vertical_alignment = 2
metadata/_edit_use_anchors_ = true
[node name="VBoxContainer2" type="VBoxContainer" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/separation = 24
[node name="TextureRect3" type="NinePatchRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer2"]
clip_contents = true
custom_minimum_size = Vector2(0, 204)
layout_mode = 2
size_flags_vertical = 0
texture = ExtResource("38_xp82q")
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer2/TextureRect3"]
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("25_m68h1")
expand_mode = 1
stretch_mode = 6
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer2/TextureRect3"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.913386
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
theme_override_font_sizes/font_size = 31
text = "头部"
horizontal_alignment = 1
vertical_alignment = 2
metadata/_edit_use_anchors_ = true
[node name="TextureRect4" type="NinePatchRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer2"]
clip_contents = true
custom_minimum_size = Vector2(0, 204)
layout_mode = 2
size_flags_vertical = 0
texture = ExtResource("38_xp82q")
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer2/TextureRect4"]
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("25_m68h1")
expand_mode = 1
stretch_mode = 6
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer2/TextureRect4"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.913386
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
theme_override_font_sizes/font_size = 31
text = "身体"
horizontal_alignment = 1
vertical_alignment = 2
metadata/_edit_use_anchors_ = true
[node name="VBoxContainer3" type="VBoxContainer" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/separation = 31
[node name="TextureRect3" type="NinePatchRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer3"]
clip_contents = true
custom_minimum_size = Vector2(0, 127)
layout_mode = 2
size_flags_vertical = 10
texture = ExtResource("37_uftd4")
patch_margin_left = 12
patch_margin_top = 12
patch_margin_right = 12
patch_margin_bottom = 12
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer3/TextureRect3"]
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("25_m68h1")
expand_mode = 1
stretch_mode = 6
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer3/TextureRect3"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.913386
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
theme_override_font_sizes/font_size = 31
text = "饰品"
horizontal_alignment = 1
vertical_alignment = 2
metadata/_edit_use_anchors_ = true
[node name="TextureRect4" type="NinePatchRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer3"]
clip_contents = true
custom_minimum_size = Vector2(0, 127)
layout_mode = 2
size_flags_vertical = 0
texture = ExtResource("37_uftd4")
patch_margin_left = 12
patch_margin_top = 12
patch_margin_right = 12
patch_margin_bottom = 12
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer3/TextureRect4"]
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("25_m68h1")
expand_mode = 1
stretch_mode = 6
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer3/TextureRect4"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.913386
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
theme_override_font_sizes/font_size = 31
text = "饰品"
horizontal_alignment = 1
vertical_alignment = 2
metadata/_edit_use_anchors_ = true
[node name="TextureRect5" type="NinePatchRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer3"]
clip_contents = true
custom_minimum_size = Vector2(0, 127)
layout_mode = 2
size_flags_vertical = 0
texture = ExtResource("37_uftd4")
patch_margin_left = 12
patch_margin_top = 12
patch_margin_right = 12
patch_margin_bottom = 12
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer3/TextureRect5"]
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("25_m68h1")
expand_mode = 1
stretch_mode = 6
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/bag/Panel/Control/HBoxContainer/VBoxContainer3/TextureRect5"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.913386
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
theme_override_font_sizes/font_size = 31
text = "手部"
horizontal_alignment = 1
vertical_alignment = 2
metadata/_edit_use_anchors_ = true
[node name="skill_config" type="MarginContainer" parent="VBoxContainer/TabContainer"]
visible = false
layout_mode = 2
@ -1732,343 +2067,8 @@ layout_mode = 2
[node name="skill_config_card_down5" parent="VBoxContainer/TabContainer/skill_config/Panel/MarginContainer/VBoxContainer/Panel2/ScrollContainer/HBoxContainer" instance=ExtResource("36_kc577")]
layout_mode = 2
[node name="Control" type="Control" parent="VBoxContainer/TabContainer/skill_config/Panel"]
layout_mode = 1
anchor_left = -0.723205
anchor_top = -0.00337838
anchor_right = -0.0364204
anchor_bottom = 0.701577
metadata/_edit_use_anchors_ = true
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/TabContainer/skill_config/Panel/Control"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 27
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/separation = 31
[node name="TextureRect" type="NinePatchRect" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer"]
clip_contents = true
custom_minimum_size = Vector2(0, 127)
layout_mode = 2
size_flags_vertical = 10
texture = ExtResource("37_uftd4")
patch_margin_left = 12
patch_margin_top = 12
patch_margin_right = 12
patch_margin_bottom = 12
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer/TextureRect"]
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("25_m68h1")
expand_mode = 1
stretch_mode = 6
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer/TextureRect"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.913386
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
theme_override_font_sizes/font_size = 31
text = "饰品"
horizontal_alignment = 1
vertical_alignment = 2
metadata/_edit_use_anchors_ = true
[node name="TextureRect2" type="NinePatchRect" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer"]
clip_contents = true
custom_minimum_size = Vector2(0, 127)
layout_mode = 2
size_flags_vertical = 8
texture = ExtResource("37_uftd4")
patch_margin_left = 12
patch_margin_top = 12
patch_margin_right = 12
patch_margin_bottom = 12
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer/TextureRect2"]
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("25_m68h1")
expand_mode = 1
stretch_mode = 6
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer/TextureRect2"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.913386
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
theme_override_font_sizes/font_size = 31
text = "饰品"
horizontal_alignment = 1
vertical_alignment = 2
metadata/_edit_use_anchors_ = true
[node name="TextureRect3" type="NinePatchRect" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer"]
clip_contents = true
custom_minimum_size = Vector2(0, 127)
layout_mode = 2
size_flags_vertical = 8
texture = ExtResource("37_uftd4")
patch_margin_left = 12
patch_margin_top = 12
patch_margin_right = 12
patch_margin_bottom = 12
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer/TextureRect3"]
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("25_m68h1")
expand_mode = 1
stretch_mode = 6
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer/TextureRect3"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.913386
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
theme_override_font_sizes/font_size = 31
text = "手部"
horizontal_alignment = 1
vertical_alignment = 2
metadata/_edit_use_anchors_ = true
[node name="VBoxContainer2" type="VBoxContainer" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/separation = 24
[node name="TextureRect3" type="NinePatchRect" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer2"]
clip_contents = true
custom_minimum_size = Vector2(0, 204)
layout_mode = 2
size_flags_vertical = 0
texture = ExtResource("38_xp82q")
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer2/TextureRect3"]
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("25_m68h1")
expand_mode = 1
stretch_mode = 6
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer2/TextureRect3"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.913386
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
theme_override_font_sizes/font_size = 31
text = "头部"
horizontal_alignment = 1
vertical_alignment = 2
metadata/_edit_use_anchors_ = true
[node name="TextureRect4" type="NinePatchRect" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer2"]
clip_contents = true
custom_minimum_size = Vector2(0, 204)
layout_mode = 2
size_flags_vertical = 0
texture = ExtResource("38_xp82q")
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer2/TextureRect4"]
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("25_m68h1")
expand_mode = 1
stretch_mode = 6
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer2/TextureRect4"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.913386
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
theme_override_font_sizes/font_size = 31
text = "身体"
horizontal_alignment = 1
vertical_alignment = 2
metadata/_edit_use_anchors_ = true
[node name="VBoxContainer3" type="VBoxContainer" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/separation = 31
[node name="TextureRect3" type="NinePatchRect" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer3"]
clip_contents = true
custom_minimum_size = Vector2(0, 127)
layout_mode = 2
size_flags_vertical = 10
texture = ExtResource("37_uftd4")
patch_margin_left = 12
patch_margin_top = 12
patch_margin_right = 12
patch_margin_bottom = 12
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer3/TextureRect3"]
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("25_m68h1")
expand_mode = 1
stretch_mode = 6
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer3/TextureRect3"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.913386
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
theme_override_font_sizes/font_size = 31
text = "饰品"
horizontal_alignment = 1
vertical_alignment = 2
metadata/_edit_use_anchors_ = true
[node name="TextureRect4" type="NinePatchRect" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer3"]
clip_contents = true
custom_minimum_size = Vector2(0, 127)
layout_mode = 2
size_flags_vertical = 0
texture = ExtResource("37_uftd4")
patch_margin_left = 12
patch_margin_top = 12
patch_margin_right = 12
patch_margin_bottom = 12
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer3/TextureRect4"]
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("25_m68h1")
expand_mode = 1
stretch_mode = 6
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer3/TextureRect4"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.913386
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
theme_override_font_sizes/font_size = 31
text = "饰品"
horizontal_alignment = 1
vertical_alignment = 2
metadata/_edit_use_anchors_ = true
[node name="TextureRect5" type="NinePatchRect" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer3"]
clip_contents = true
custom_minimum_size = Vector2(0, 127)
layout_mode = 2
size_flags_vertical = 0
texture = ExtResource("37_uftd4")
patch_margin_left = 12
patch_margin_top = 12
patch_margin_right = 12
patch_margin_bottom = 12
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer3/TextureRect5"]
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("25_m68h1")
expand_mode = 1
stretch_mode = 6
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/skill_config/Panel/Control/HBoxContainer/VBoxContainer3/TextureRect5"]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.913386
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
theme_override_font_sizes/font_size = 31
text = "手部"
horizontal_alignment = 1
vertical_alignment = 2
metadata/_edit_use_anchors_ = true
[node name="start_config" type="MarginContainer" parent="VBoxContainer/TabContainer"]
visible = false
layout_mode = 2
theme_override_constants/margin_left = 54
theme_override_constants/margin_top = 8

View File

@ -9,10 +9,9 @@ var now_select_index:int=-1:
select(now_select_index,val)
now_select_index=val
func _ready() -> void:
refresh()
select(-1,-1)
pass
refresh()
func select(before:int,ind:int):
btn_panel_group[before+1].add_theme_stylebox_override("panel",StyleBoxEmpty.new())
@ -24,8 +23,12 @@ func select(before:int,ind:int):
var new_card=CHARACTER_BAG_CARD.instantiate()
new_card.data=i
%card_add_pos.add_child(new_card)
new_card.self_click.connect(character_card_click)
pass
func character_card_click(data:Dictionary):
%basic_mes.data=data
%basic_mes.init_from_data()
%animation.play("open_mes")
pass
@ -34,7 +37,7 @@ func _on_back_btn_pressed() -> void:
pass # Replace with function body.
func refresh():
data=Global.get_all_character()
select(-1,-1)
pass
@ -62,3 +65,10 @@ func _on_reality_pressed() -> void:
func _on_eschatological_pressed() -> void:
now_select_index=3
pass # Replace with function body.
func _on_basic_mes_close() -> void:
refresh()
pass # Replace with function body.

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=18 format=3 uid="uid://cgl1vcdusqroq"]
[gd_scene load_steps=21 format=3 uid="uid://cgl1vcdusqroq"]
[ext_resource type="Texture2D" uid="uid://bxbwbvgbfntiv" path="res://res/ui/ui_004_character_bag/tuceng1.png" id="1_688g7"]
[ext_resource type="Script" path="res://scene/character_bag.gd" id="1_e5f2o"]
@ -22,6 +22,67 @@
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xo627"]
[sub_resource type="Animation" id="Animation_7n3j6"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("basic_mes:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("basic_mes:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 0)]
}
[sub_resource type="Animation" id="Animation_acbpg"]
resource_name = "open_mes"
length = 0.2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("basic_mes:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("basic_mes:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.2),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_8pf4e"]
_data = {
"RESET": SubResource("Animation_7n3j6"),
"open_mes": SubResource("Animation_acbpg")
}
[node name="Control" type="Control"]
layout_mode = 3
anchors_preset = 15
@ -247,11 +308,19 @@ layout_mode = 2
[node name="basic_mes" parent="." instance=ExtResource("13_lbwxs")]
unique_name_in_owner = true
visible = false
modulate = Color(1, 1, 1, 0)
layout_mode = 1
[node name="animation" type="AnimationPlayer" parent="."]
unique_name_in_owner = true
libraries = {
"": SubResource("AnimationLibrary_8pf4e")
}
[connection signal="pressed" from="back_texture/back_btn" to="." method="_on_back_btn_pressed"]
[connection signal="pressed" from="NinePatchRect2/MarginContainer/VBoxContainer/PanelContainer/all" to="." method="_on_all_pressed"]
[connection signal="pressed" from="NinePatchRect2/MarginContainer/VBoxContainer/PanelContainer2/history" to="." method="_on_history_pressed"]
[connection signal="pressed" from="NinePatchRect2/MarginContainer/VBoxContainer/PanelContainer3/fantasy" to="." method="_on_fantasy_pressed"]
[connection signal="pressed" from="NinePatchRect2/MarginContainer/VBoxContainer/PanelContainer4/reality" to="." method="_on_reality_pressed"]
[connection signal="pressed" from="NinePatchRect2/MarginContainer/VBoxContainer/PanelContainer5/eschatological" to="." method="_on_eschatological_pressed"]
[connection signal="close" from="basic_mes" to="." method="_on_basic_mes_close"]

View File

@ -21,7 +21,6 @@ func set_character_name(n:String):
%n.text=n
pass
func _ready() -> void:
data=Global.get_character_data("test_character_01")
set_star_num(CharacterTool.get_character_star_num(data))
set_face(Global.get_texture(CharacterTool.get_skin_now_use_data(data)["card_face"]))
set_character_name(CharacterTool.get_character_name(data))

View File

@ -18,7 +18,7 @@ var data:Dictionary={
func _on_back_pressed() -> void:
back.emit()
pass # Replace with function body.
func _ready() -> void:
func fresh():
start.disable(true)
for i in character_add_pos.get_children():
i.queue_free()
@ -27,6 +27,8 @@ func _ready() -> void:
character_add_pos.add_child(new_character)
new_character.set_data(Global.get_character_data(i))
new_character.pressed.connect(pressed)
func _ready() -> void:
fresh()
func pressed(data,node,is_select):

View File

@ -36,8 +36,8 @@ func _ready() -> void:
func set_data(_data:Dictionary):
data=_data
var skin_data=data["character"]["skin"][data["character"]["skin_now_use"]]
var skin_data=CharacterTool.get_skin_now_use_data(data)
texture_face.texture=Global.get_texture(skin_data["card_face"])
set_star_num(data["character"]["star"])
n.text=data["character"]["name"]
set_star_num(data["star"])
n.text=data["name"]
pass

View File

@ -23,8 +23,8 @@ func _ready() -> void:
Global.time_changed.connect(update_date)
Global.now_game_flow=self
var character_data=Global.get_now_character_data()
character_texture.texture=Global.get_texture(character_data["character"]["head"])
character_name.text=character_data["character"]["name"]
character_texture.texture=Global.get_texture(CharacterTool.get_head(character_data))
character_name.text=CharacterTool.get_character_name(character_data)
func set_scene(id:String):
scene_data=Global.get_scene_data(id)
back.texture=Global.get_texture(scene_data["texture"])

View File

@ -172,6 +172,7 @@ func _on_difficulty_selection_back() -> void:
func _on_difficulty_selection_select(ind: int) -> void:
$DrawerContainer.change_open(true)
%character_select.fresh()
pass # Replace with function body.

View File

@ -573,6 +573,7 @@ is_open = false
rag = 1.0
[node name="character_select" parent="DrawerContainer" instance=ExtResource("17_cueqv")]
unique_name_in_owner = true
layout_mode = 2
[connection signal="pressed" from="HBoxContainer/continue_texture/continue_button" to="." method="_on_continue_button_pressed"]

View File

@ -8,7 +8,7 @@ var index:int=0
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
#-1:上锁0解锁未选择1解锁且选择
#-1:上锁0解锁未选择1解锁且选择 -2:刚实例出来
var state:int=-2:
set(val):
if val!=state: