diff --git a/components/Scenes/FullscreenPanels/CompilingTip.tscn b/components/Scenes/FullscreenPanels/CompilingTip.tscn new file mode 100644 index 0000000..6deaa82 --- /dev/null +++ b/components/Scenes/FullscreenPanels/CompilingTip.tscn @@ -0,0 +1,26 @@ +[gd_scene load_steps=5 format=3 uid="uid://dxs5j0km0n2n4"] + +[ext_resource type="PackedScene" uid="uid://d3qojeqa3difn" path="res://components/Abstracts/FullscreenPanelBase.tscn" id="1_vd4qa"] +[ext_resource type="Script" uid="uid://dubab2jnii6et" path="res://scripts/Contents/Panels/CompilingTip.gd" id="2_3guax"] +[ext_resource type="Texture2D" uid="uid://bgrjcmcsg1okc" path="res://resources/comics/start.svg" id="2_64ee7"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_64ee7"] +content_margin_top = 60.0 +content_margin_bottom = 60.0 + +[node name="CompilingTip" instance=ExtResource("1_vd4qa")] +offset_top = 0.0 +offset_bottom = 0.0 +script = ExtResource("2_3guax") + +[node name="PanelContainer" type="PanelContainer" parent="content/wrapper" index="0"] +layout_mode = 2 +size_flags_vertical = 3 +theme_override_styles/panel = SubResource("StyleBoxEmpty_64ee7") + +[node name="TextureRect" type="TextureRect" parent="content/wrapper/PanelContainer" index="0"] +layout_mode = 2 +size_flags_vertical = 3 +texture = ExtResource("2_64ee7") +expand_mode = 1 +stretch_mode = 5 diff --git a/components/Scenes/UI.tscn b/components/Scenes/UI.tscn index 806e6fe..e1aaceb 100644 --- a/components/Scenes/UI.tscn +++ b/components/Scenes/UI.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=25 format=3 uid="uid://dfwg750a47ggx"] +[gd_scene load_steps=26 format=3 uid="uid://dfwg750a47ggx"] [ext_resource type="PackedScene" uid="uid://ofpg5s3j7esv" path="res://components/UI/BossBar.tscn" id="1_2pe58"] [ext_resource type="Script" uid="uid://bph6blsdbiklk" path="res://scripts/Statemachine/UIState.gd" id="1_f00a6"] @@ -14,6 +14,7 @@ [ext_resource type="PackedScene" uid="uid://dekcqdhrjs07u" path="res://components/Scenes/FullscreenPanels/Weapon.tscn" id="13_bmc24"] [ext_resource type="PackedScene" uid="uid://w2o3klbsssq3" path="res://components/Scenes/FullscreenPanels/Thanks.tscn" id="14_gp8lx"] [ext_resource type="PackedScene" uid="uid://c0r1i5tdbwljj" path="res://components/Scenes/FullscreenPanels/Starter.tscn" id="14_pjwgj"] +[ext_resource type="PackedScene" uid="uid://dxs5j0km0n2n4" path="res://components/Scenes/FullscreenPanels/CompilingTip.tscn" id="15_scul2"] [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_12otr"] @@ -328,3 +329,7 @@ layout_mode = 1 visible = false z_index = 2 layout_mode = 1 + +[node name="CompilingTip" parent="root/panels" instance=ExtResource("15_scul2")] +visible = false +layout_mode = 1 diff --git a/resources/comics/start.png b/resources/comics/start.png new file mode 100644 index 0000000..23e8cee Binary files /dev/null and b/resources/comics/start.png differ diff --git a/resources/comics/start.png.import b/resources/comics/start.png.import new file mode 100644 index 0000000..e2b30b2 --- /dev/null +++ b/resources/comics/start.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c3q6c5km3j08t" +path="res://.godot/imported/start.png-90b18a1ed5ed229e06f983ed4e4ea24c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resources/comics/start.png" +dest_files=["res://.godot/imported/start.png-90b18a1ed5ed229e06f983ed4e4ea24c.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +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/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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 diff --git a/resources/comics/start.svg b/resources/comics/start.svg new file mode 100644 index 0000000..b68885c --- /dev/null +++ b/resources/comics/start.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/comics/start.svg.import b/resources/comics/start.svg.import new file mode 100644 index 0000000..ce91283 --- /dev/null +++ b/resources/comics/start.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bgrjcmcsg1okc" +path="res://.godot/imported/start.svg-5aa03940e5e567513a100d1915eba804.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resources/comics/start.svg" +dest_files=["res://.godot/imported/start.svg-5aa03940e5e567513a100d1915eba804.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +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/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/scripts/Contents/Panels/CompilingTip.gd b/scripts/Contents/Panels/CompilingTip.gd new file mode 100644 index 0000000..926fe82 --- /dev/null +++ b/scripts/Contents/Panels/CompilingTip.gd @@ -0,0 +1,5 @@ +@tool +extends FullscreenPanelBase + +func afterOpen(_args: Array = []): + UIState.closeCurrentPanel() diff --git a/scripts/Contents/Panels/CompilingTip.gd.uid b/scripts/Contents/Panels/CompilingTip.gd.uid new file mode 100644 index 0000000..a7eee4f --- /dev/null +++ b/scripts/Contents/Panels/CompilingTip.gd.uid @@ -0,0 +1 @@ +uid://dubab2jnii6et diff --git a/scripts/Contents/Panels/Starter.gd b/scripts/Contents/Panels/Starter.gd index 157174e..22a13bb 100644 --- a/scripts/Contents/Panels/Starter.gd +++ b/scripts/Contents/Panels/Starter.gd @@ -65,7 +65,7 @@ func startSingleplayerGame(): MultiplayerState.playerName = playerNameInput.text EntityBase.generatePlayer(playerNameInput.text) WorldManager.rootNode.spawnWave(Vector2.ZERO) - UIState.closeCurrentPanel() + UIState.setPanel("CompilingTip") func _ready(): historyStack = Composables.useHistoryStack(playerNameInput) diff --git a/scripts/Statemachine/FullscreenPanelBase.gd b/scripts/Statemachine/FullscreenPanelBase.gd index 380913a..ac0f60c 100644 --- a/scripts/Statemachine/FullscreenPanelBase.gd +++ b/scripts/Statemachine/FullscreenPanelBase.gd @@ -5,6 +5,7 @@ class_name FullscreenPanelBase @onready var animator = $"%animator" func hidePanel(): + beforeClose() animator.play("hide") await animator.animation_finished visible = false @@ -14,9 +15,14 @@ func showPanel(args: Array = []): visible = true animator.play("show") await animator.animation_finished + afterOpen(args) # 钩子 func beforeOpen(_args: Array = []): pass +func afterOpen(_args: Array = []): + pass +func beforeClose(): + pass func afterClose(): pass