diff --git a/autoload/BGM/script/bgm.gd b/autoload/BGM/script/bgm.gd new file mode 100644 index 0000000..7d0da1d --- /dev/null +++ b/autoload/BGM/script/bgm.gd @@ -0,0 +1,14 @@ +extends Node + +func set_bgm(value): + if %BGM.stream == null: + %BGM.stream = value + %BGM.play() + else: + var tween = get_tree().create_tween() + tween.tween_property(%BGM, "volume_db",-20 , 1) + await get_tree().create_timer(1).timeout + %BGM.stream = value + %BGM.play() + tween = get_tree().create_tween() + tween.tween_property(%BGM, "volume_db",0 , 0.5) diff --git a/autoload/BGM/tscn/bgm.tscn b/autoload/BGM/tscn/bgm.tscn new file mode 100644 index 0000000..419d1df --- /dev/null +++ b/autoload/BGM/tscn/bgm.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://bdjimjjwd0iur"] + +[ext_resource type="Script" path="res://autoload/BGM/script/bgm.gd" id="1_ah4s8"] + +[node name="BGM" type="Node"] +script = ExtResource("1_ah4s8") + +[node name="BGM" type="AudioStreamPlayer" parent="."] +unique_name_in_owner = true +bus = &"BGM" diff --git a/autoload/global/script/global.gd b/autoload/global/script/global.gd index 896b98b..09ca16d 100644 --- a/autoload/global/script/global.gd +++ b/autoload/global/script/global.gd @@ -11,11 +11,22 @@ var event_json_path:String="res://json/event.json" var event_data:Dictionary var scene_json_path:String="res://json/scene.json" var scene_data:Dictionary +var character_json_path:String="res://json/character.json" +var character_data:Dictionary +var system_config_data:Dictionary={ + +} + + +var now_game_data:Dictionary={ + "time":99999 +} func _ready() -> void: load_texture_data() load_script_data() load_event_data() load_scene_data() + load_character_data() func load_texture_data(): var file=FileAccess.open(texture_json_path,FileAccess.READ) var str=file.get_as_text() @@ -52,6 +63,13 @@ func load_scene_data(): dictionary[i]["id"]=i scene_data=dictionary pass +func load_character_data(): + var file=FileAccess.open(character_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 + character_data=dictionary func get_texture(id:String): if texture_data.has(id): return texture_data[id] @@ -78,3 +96,9 @@ func get_scene_data(id:String): return dictionary.duplicate() else: return null +func get_character_data(id:String): + if character_data.has(id): + var dictionary:Dictionary=scene_data[id] + return dictionary.duplicate() + else: + return null diff --git a/autoload/scene_manager/script/scene_manager.gd b/autoload/scene_manager/script/scene_manager.gd index 1ba5097..aa23c29 100644 --- a/autoload/scene_manager/script/scene_manager.gd +++ b/autoload/scene_manager/script/scene_manager.gd @@ -22,7 +22,7 @@ func change_scene_to(path:String): percent.text="20" await get_tree().create_timer(0.2).timeout load_path=path - ResourceLoader.load_threaded_request(path,"PackedScene",true) + ResourceLoader.load_threaded_request(path,"PackedScene") set_process(true) # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: diff --git a/autoload/scene_manager/tscn/scene_manager.tscn b/autoload/scene_manager/tscn/scene_manager.tscn index 0c07c82..4671579 100644 --- a/autoload/scene_manager/tscn/scene_manager.tscn +++ b/autoload/scene_manager/tscn/scene_manager.tscn @@ -72,6 +72,7 @@ tracks/0/keys = { [sub_resource type="Animation" id="Animation_m3y4q"] resource_name = "breath" +length = 0.5 loop_mode = 1 tracks/0/type = "value" tracks/0/imported = false @@ -80,10 +81,10 @@ tracks/0/path = NodePath("ColorRect/HBoxContainer:modulate") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { -"times": PackedFloat32Array(0, 0.5, 1), -"transitions": PackedFloat32Array(1, 1, 1), +"times": PackedFloat32Array(0, 0.25), +"transitions": PackedFloat32Array(1, 1), "update": 0, -"values": [Color(1, 1, 1, 1), Color(0.54099, 0.54099, 0.54099, 1), Color(1, 1, 1, 1)] +"values": [Color(1, 1, 1, 1), Color(0.54099, 0.54099, 0.54099, 1)] } [sub_resource type="AnimationLibrary" id="AnimationLibrary_8ttym"] @@ -93,6 +94,7 @@ _data = { } [node name="SceneManager" type="CanvasLayer"] +process_mode = 3 layer = 100 script = ExtResource("1_q8xsu") diff --git a/class/tool/DrawerContainer.gd b/class/tool/DrawerContainer.gd index 201778c..99609d9 100644 --- a/class/tool/DrawerContainer.gd +++ b/class/tool/DrawerContainer.gd @@ -156,6 +156,8 @@ func fit_children()->void: ##更改窗口的开闭状态,使用动画 func change_open(opened:bool=false): + if opened==is_open: + return if now_keep_tween!=null: now_keep_tween.kill() if !opened: diff --git a/default_bus_layout.tres b/default_bus_layout.tres new file mode 100644 index 0000000..5bdae02 --- /dev/null +++ b/default_bus_layout.tres @@ -0,0 +1,16 @@ +[gd_resource type="AudioBusLayout" format=3 uid="uid://dds0ostkug6qj"] + +[resource] +bus/0/send = &"New Bus" +bus/1/name = &"BGM" +bus/1/solo = false +bus/1/mute = false +bus/1/bypass_fx = false +bus/1/volume_db = 0.0 +bus/1/send = &"Master" +bus/2/name = &"Effect" +bus/2/solo = false +bus/2/mute = false +bus/2/bypass_fx = false +bus/2/volume_db = 0.0 +bus/2/send = &"Master" diff --git a/json/banner.json b/json/banner.json new file mode 100644 index 0000000..cd023f2 --- /dev/null +++ b/json/banner.json @@ -0,0 +1,13 @@ +{ + "banner_01":{ + "name":"测试卡池01", + "side_texture":"test_character", + "back":"test_scene", + "character":"test_character", + "probability":[ + { + + } + ] + } +} diff --git a/json/character.json b/json/character.json new file mode 100644 index 0000000..99349f4 --- /dev/null +++ b/json/character.json @@ -0,0 +1,85 @@ +{ + "test_character_01":{ + "character":{ + "name":"朱雀院椿(测试)", + "star":5, + "skin":[ + { + "name":"皮肤1", + "card_face":"test_character_tsubaki", + "character":"角色图片路径" + } + ], + "skin_now_use":0 + }, + "basic_mes":{ + "script_category":"剧本类别", + "place":"地点", + "sex":0, + "race":"种族", + "birthday":"xxxx-xx-xx", + + "introduction":"这是一个介绍", + "basic_attribute":[ + { + "name":"体质", + "value":100, + }, + { + "name":"敏捷", + "value":100, + }, + { + "name":"智力", + "value":100, + }, + { + "name":"感知", + "value":100, + }, + ], + "fight_attribute":[ + { + "name":"生命", + "value":100, + }, + { + "name":"精神", + "value":100, + }, + { + "name":"物理攻击", + "value":100, + }, + { + "name":"法术强度", + "value":100, + }, + ] + }, + "special":[ + { + "name":"倾国倾城", + "introduction":"鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果" + } + ], + "ability":[ + { + "name":"武学 LV3", + "introduction":"鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果鼠标点击显示具体效果" + } + ], + + "favor":[{ + "name":"姐姐", + "value":100 + } + ], + "reputation":[ + { + "name":"某地区", + "value":100 + } + ] + } +} diff --git a/json/event.json b/json/event.json index bf0ced3..c70c58e 100644 --- a/json/event.json +++ b/json/event.json @@ -5,7 +5,36 @@ "text":"测试事件", "choice":[ { - "name":"测试选项1" + "name":"测试选项1", + "triger":[{ + "type":"change_scene" + }, + { + "type":"change_event", + "data":"event_01" + }, + { + "type":"change_texture", + "data":"test_character" + }, + { + "type":"music", + "data":"res://test/audio/attack_0.wav" + }, + { + "type":"fight" + }, + { + "type":"identification" + }, + { + "type":"change_attribute" + }, + { + "type":"change_value" + }, + + ] }, { "name":"测试选项2" diff --git a/json/texture.json b/json/texture.json index ac9acd7..6bf3b92 100644 --- a/json/texture.json +++ b/json/texture.json @@ -1,5 +1,6 @@ { "texture_test":"res://test/texture/test_texture.png", "test_scene":"res://test/texture/test_scene.png", - "test_character":"res://test/texture/test_character.png" + "test_character":"res://test/texture/test_character.png", + "test_character_tsubaki":"res://test/texture/tsubaki_1.png" } diff --git a/project.godot b/project.godot index eef96dd..379ebd6 100644 --- a/project.godot +++ b/project.godot @@ -20,6 +20,7 @@ config/icon="res://icon.svg" PopUpWindow="*res://addons/popupwindow/PopUpWindow.tscn" Global="*res://autoload/global/tscn/global.tscn" SceneManager="*res://autoload/scene_manager/tscn/scene_manager.tscn" +Bgm="*res://autoload/BGM/tscn/bgm.tscn" [display] @@ -29,3 +30,11 @@ window/size/viewport_height=1080 [editor_plugins] enabled=PackedStringArray("res://addons/popupwindow/plugin.cfg") + +[input] + +mouse_left={ +"deadzone": 0.5, +"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(272, 11),"global_position":Vector2(281, 57),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null) +] +} diff --git a/res/shader/blur.gdshader b/res/shader/blur.gdshader index d255d92..54c9d5c 100644 --- a/res/shader/blur.gdshader +++ b/res/shader/blur.gdshader @@ -1,5 +1,4 @@ shader_type canvas_item; -//@A shader by 刚学没几天的小策划@SL uniform float power : hint_range(0.2, 4.0, 0.1) = 1.0; uniform float up : hint_range(0.0, 1.0, 0.001) = 0.1; uniform float down : hint_range(0.0, 1.0, 0.001) = 0.1; diff --git a/scene/bag_side_card.gd b/scene/bag_side_card.gd new file mode 100644 index 0000000..125421e --- /dev/null +++ b/scene/bag_side_card.gd @@ -0,0 +1,30 @@ +extends TextureRect +var is_mouse_enter:bool=false +signal click(data:Dictionary) +var data:Dictionary={ + +} +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass +func _input(event: InputEvent) -> void: + if event.is_action_pressed("mouse_left") and is_mouse_enter: + click.emit(data) +func _get_drag_data(at_position: Vector2) -> Variant: + var texture_rect=TextureRect.new() + texture_rect.texture=Global.get_texture(data["texture"]) + set_drag_preview(texture_rect) + return data +func _on_mouse_entered() -> void: + is_mouse_enter=true + pass # Replace with function body. + + +func _on_mouse_exited() -> void: + is_mouse_enter=false + pass # Replace with function body. diff --git a/scene/bag_side_card.tscn b/scene/bag_side_card.tscn index da0772a..db06104 100644 --- a/scene/bag_side_card.tscn +++ b/scene/bag_side_card.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=4 format=3 uid="uid://dfhx4088ydrme"] +[gd_scene load_steps=5 format=3 uid="uid://dfhx4088ydrme"] [ext_resource type="Texture2D" uid="uid://13g8uityud7a" path="res://res/ui/ui_008_bag/tuceng159.png" id="1_ep34g"] [ext_resource type="Texture2D" uid="uid://li8e5ntlgcpg" path="res://res/ui/ui_003_select/test.png" id="2_4o4bp"] +[ext_resource type="Script" path="res://scene/bag_side_card.gd" id="2_frdwk"] [ext_resource type="Texture2D" uid="uid://buq2xt621xilr" path="res://res/ui/ui_008_bag/tuceng160.png" id="3_if27l"] [node name="bag_side_card" type="TextureRect"] @@ -13,6 +14,7 @@ offset_bottom = -150.0 size_flags_horizontal = 2 size_flags_vertical = 0 texture = ExtResource("1_ep34g") +script = ExtResource("2_frdwk") metadata/_edit_use_anchors_ = true [node name="face" type="TextureRect" parent="."] @@ -42,12 +44,5 @@ expand_mode = 1 stretch_mode = 5 metadata/_edit_use_anchors_ = true -[node name="Button" type="Button" parent="."] -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -focus_mode = 0 -flat = true +[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"] +[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"] diff --git a/scene/banner.tscn b/scene/banner.tscn index 364de80..42613ff 100644 --- a/scene/banner.tscn +++ b/scene/banner.tscn @@ -355,6 +355,7 @@ theme_override_font_sizes/font_size = 34 text = "9999" [node name="banner_detail" parent="." instance=ExtResource("19_mb4ei")] +visible = false layout_mode = 1 [connection signal="pressed" from="MarginContainer/HBoxContainer/VBoxContainer/TextureRect/back" to="." method="_on_back_pressed"] diff --git a/scene/basic_message.tscn b/scene/basic_message.tscn index 0f695ff..9a9d73d 100644 --- a/scene/basic_message.tscn +++ b/scene/basic_message.tscn @@ -155,7 +155,7 @@ size_flags_horizontal = 3 [node name="character" type="TextureRect" parent="."] layout_mode = 1 anchors_preset = -1 -anchor_left = 0.33 +anchor_left = 0.290417 anchor_top = 1.0 anchor_right = 0.33 anchor_bottom = 1.0 @@ -163,7 +163,7 @@ offset_left = -266.6 offset_top = -977.0 offset_right = 266.4 expand_mode = 1 -stretch_mode = 3 +stretch_mode = 6 metadata/_edit_use_anchors_ = true [node name="texture" type="TextureRect" parent="."] diff --git a/scene/event.gd b/scene/event.gd index ccbd2ba..6263799 100644 --- a/scene/event.gd +++ b/scene/event.gd @@ -4,8 +4,11 @@ const EVENT_CHOICE_BUTTON = preload("res://scene/event_choice_button.tscn") @onready var event_texture: TextureRect = $MarginContainer/HBoxContainer/event_texture @onready var event_intro: Label = $MarginContainer/NinePatchRect/VBoxContainer/event_intro @onready var event_name: Label = $MarginContainer/NinePatchRect/TextureRect/event_name +@onready var animation_player: AnimationPlayer = $AnimationPlayer +@onready var audio_stream_player: AudioStreamPlayer = $AudioStreamPlayer var data:Dictionary +var text_ratio_tween:Tween # Called when the node enters the scene tree for the first time. func _ready() -> void: set_event_data("event_01") @@ -28,5 +31,30 @@ func set_event_data(id:String): var new_btn=EVENT_CHOICE_BUTTON.instantiate() choice_add_pos.add_child(new_btn) new_btn.set_data(i) + new_btn.click.connect(choice_click) + animation_player.play("open") +func choice_click(event_data:Dictionary): + for i in event_data["triger"]: + + + + match i["type"]: + "change_event": + set_event_data(i["data"]) + "change_texture": + + event_texture.texture=Global.get_texture(i["data"]) + pass + "end": + hide() + "music": + audio_stream_player.stream=load(i["data"]) + audio_stream_player.play() + pass + + + pass + pass + pass diff --git a/scene/event.tscn b/scene/event.tscn index 6a30b3c..33d6c54 100644 --- a/scene/event.tscn +++ b/scene/event.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=10 format=3 uid="uid://b3hw4w5shpyu0"] +[gd_scene load_steps=13 format=3 uid="uid://b3hw4w5shpyu0"] [ext_resource type="Script" path="res://scene/event.gd" id="1_cpmb4"] [ext_resource type="Texture2D" uid="uid://ctfm87nw7xemy" path="res://res/ui/ui_020_event/tuceng1.png" id="1_u31m8"] @@ -11,16 +11,53 @@ [sub_resource type="ShaderMaterial" id="ShaderMaterial_2da64"] shader = ExtResource("2_l482b") -shader_parameter/power = 0.7 -shader_parameter/up = 0.1 -shader_parameter/down = 0.1 -shader_parameter/left = 0.988 +shader_parameter/power = 0.8 +shader_parameter/up = 0.0 +shader_parameter/down = 0.0 +shader_parameter/left = 1.0 shader_parameter/right = 0.0 shader_parameter/up_clip = 0.0 shader_parameter/down_clip = 0.0 shader_parameter/left_clip = 0.0 shader_parameter/right_clip = 0.0 +[sub_resource type="Animation" id="Animation_e8sku"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("MarginContainer:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(0.454524, 0.454524, 0.454524, 1)] +} + +[sub_resource type="Animation" id="Animation_vvm5c"] +resource_name = "open" +length = 0.5 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("MarginContainer:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.5), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(0.454524, 0.454524, 0.454524, 1), Color(1, 1, 1, 1)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_526vg"] +_data = { +"RESET": SubResource("Animation_e8sku"), +"open": SubResource("Animation_vvm5c") +} + [node name="event" type="Control"] layout_mode = 3 anchors_preset = 15 @@ -42,6 +79,7 @@ expand_mode = 1 stretch_mode = 6 [node name="MarginContainer" type="MarginContainer" parent="."] +modulate = Color(0.454524, 0.454524, 0.454524, 1) layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -64,7 +102,7 @@ layout_mode = 2 size_flags_horizontal = 10 texture = ExtResource("3_xsoi1") expand_mode = 3 -stretch_mode = 6 +stretch_mode = 4 [node name="NinePatchRect" type="NinePatchRect" parent="MarginContainer"] layout_mode = 2 @@ -107,7 +145,7 @@ layout_mode = 1 anchors_preset = -1 anchor_left = 0.0322052 anchor_top = 0.127872 -anchor_right = 0.425764 +anchor_right = 0.465065 anchor_bottom = 1.0 metadata/_edit_use_anchors_ = true @@ -141,3 +179,11 @@ size_flags_horizontal = 4 [node name="event_choice_button3" parent="MarginContainer/NinePatchRect/VBoxContainer/VBoxContainer/choice_add_pos" instance=ExtResource("7_o3va1")] layout_mode = 2 size_flags_horizontal = 4 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_526vg") +} + +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] +bus = &"Effect" diff --git a/scene/event_choice_button.gd b/scene/event_choice_button.gd index 113cd23..902c2f7 100644 --- a/scene/event_choice_button.gd +++ b/scene/event_choice_button.gd @@ -1,5 +1,5 @@ extends NinePatchRect -signal click +signal click(event_data:Dictionary) var data:Dictionary @onready var label: Label = $Label @@ -20,5 +20,5 @@ func _process(delta: float) -> void: func _on_tool_button_pressed() -> void: - click.emit() + click.emit(data) pass # Replace with function body. diff --git a/scene/save_and_load.gd b/scene/save_and_load.gd new file mode 100644 index 0000000..a1d4176 --- /dev/null +++ b/scene/save_and_load.gd @@ -0,0 +1,11 @@ +extends Control + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass diff --git a/scene/save_and_load.tscn b/scene/save_and_load.tscn index d26c219..0e44e09 100644 --- a/scene/save_and_load.tscn +++ b/scene/save_and_load.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=7 format=3 uid="uid://ln0ri824gh2c"] +[gd_scene load_steps=8 format=3 uid="uid://ln0ri824gh2c"] [ext_resource type="Texture2D" uid="uid://cuvwrwhll8tk6" path="res://res/ui/ui_024_save_and_load/tuceng457.png" id="1_0vq46"] +[ext_resource type="Script" path="res://scene/save_and_load.gd" id="1_db4b7"] [ext_resource type="Texture2D" uid="uid://6gaiu7avwkot" path="res://res/ui/ui_024_save_and_load/tuceng341.png" id="2_q3e74"] [ext_resource type="PackedScene" uid="uid://3gy704lvqpgt" path="res://scene/save_and_load_mono.tscn" id="3_exjxy"] [ext_resource type="Texture2D" uid="uid://dmg8l7qw8qrum" path="res://res/ui/ui_024_save_and_load/tuceng338.png" id="3_nty4b"] @@ -20,6 +21,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +script = ExtResource("1_db4b7") [node name="back" type="TextureRect" parent="."] layout_mode = 1 diff --git a/scene/save_and_load_mono.gd b/scene/save_and_load_mono.gd new file mode 100644 index 0000000..959f04d --- /dev/null +++ b/scene/save_and_load_mono.gd @@ -0,0 +1,17 @@ +extends NinePatchRect + +var need_save:bool=true + +func _ready() -> void: + if need_save: + $TextureRect3.show() + else: + $TextureRect3.hide() + + +func _on_save_pressed() -> void: + pass # Replace with function body. + + +func _on_load_pressed() -> void: + pass # Replace with function body. diff --git a/scene/save_and_load_mono.tscn b/scene/save_and_load_mono.tscn index 6fd937f..782004e 100644 --- a/scene/save_and_load_mono.tscn +++ b/scene/save_and_load_mono.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=7 format=3 uid="uid://3gy704lvqpgt"] +[gd_scene load_steps=8 format=3 uid="uid://3gy704lvqpgt"] [ext_resource type="Texture2D" uid="uid://dkbafbthkd1dn" path="res://res/ui/ui_024_save_and_load/tuceng343.png" id="1_hv83j"] [ext_resource type="Texture2D" uid="uid://dvlqfyhb3xys2" path="res://res/ui/ui_024_save_and_load/tuceng342.png" id="2_2efqg"] +[ext_resource type="Script" path="res://scene/save_and_load_mono.gd" id="2_cc78r"] [ext_resource type="Texture2D" uid="uid://bjnmy6ia0bk4h" path="res://res/ui/ui_024_save_and_load/tuceng346.png" id="3_k0rp4"] [ext_resource type="PackedScene" uid="uid://bdlo2wn4qnygv" path="res://scene/tool/tool_button.tscn" id="4_i5nwn"] [ext_resource type="Texture2D" uid="uid://5rcik6ljiv0r" path="res://res/ui/ui_024_save_and_load/tuceng344.png" id="5_l2xar"] @@ -16,6 +17,7 @@ patch_margin_left = 16 patch_margin_top = 14 patch_margin_right = 12 patch_margin_bottom = 14 +script = ExtResource("2_cc78r") [node name="TextureRect" type="TextureRect" parent="."] show_behind_parent = true @@ -134,7 +136,7 @@ horizontal_alignment = 1 vertical_alignment = 1 metadata/_edit_use_anchors_ = true -[node name="ToolButton" parent="TextureRect3" instance=ExtResource("4_i5nwn")] +[node name="save" parent="TextureRect3" instance=ExtResource("4_i5nwn")] layout_mode = 1 [node name="TextureRect4" type="TextureRect" parent="."] @@ -162,5 +164,8 @@ horizontal_alignment = 1 vertical_alignment = 1 metadata/_edit_use_anchors_ = true -[node name="ToolButton" parent="TextureRect4" instance=ExtResource("4_i5nwn")] +[node name="load" parent="TextureRect4" instance=ExtResource("4_i5nwn")] layout_mode = 1 + +[connection signal="pressed" from="TextureRect3/save" to="." method="_on_save_pressed"] +[connection signal="pressed" from="TextureRect4/load" to="." method="_on_load_pressed"] diff --git a/scene/select.gd b/scene/select.gd index 036dbdc..d495a2b 100644 --- a/scene/select.gd +++ b/scene/select.gd @@ -19,9 +19,7 @@ var data:Dictionary={ "eschatological":[ ], - "continue":{ - - } + } var now_selected_script:String="history" var now_selected_script_id:String @@ -63,7 +61,7 @@ func side_btn_clicked(ind:int): %script_name.text=now_select_array[ind]["name"] %script_introduction.text=now_select_array[ind]["introduction"] now_selected_script_id=btn.id - print(btn.id) + pass func get_global_script_data(): var glbdt=Global.get_all_script_data() diff --git a/test/audio/attack_0.wav b/test/audio/attack_0.wav new file mode 100644 index 0000000..6a2527e Binary files /dev/null and b/test/audio/attack_0.wav differ diff --git a/test/audio/attack_0.wav.import b/test/audio/attack_0.wav.import new file mode 100644 index 0000000..a26900b --- /dev/null +++ b/test/audio/attack_0.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://cv3d1k2ismkln" +path="res://.godot/imported/attack_0.wav-4edcd5a080eaa423e80c7eb2f95c053a.sample" + +[deps] + +source_file="res://test/audio/attack_0.wav" +dest_files=["res://.godot/imported/attack_0.wav-4edcd5a080eaa423e80c7eb2f95c053a.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/test/texture/tsubaki_1.png b/test/texture/tsubaki_1.png new file mode 100644 index 0000000..585cc4f Binary files /dev/null and b/test/texture/tsubaki_1.png differ diff --git a/test/texture/tsubaki_1.png.import b/test/texture/tsubaki_1.png.import new file mode 100644 index 0000000..e80d31c --- /dev/null +++ b/test/texture/tsubaki_1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://da4mwbefqkahf" +path="res://.godot/imported/tsubaki_1.png-97dabc23892d56dc49647f215f5e681d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://test/texture/tsubaki_1.png" +dest_files=["res://.godot/imported/tsubaki_1.png-97dabc23892d56dc49647f215f5e681d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1