mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(UI): 添加编译提示面板并更新启动流程
在启动单机游戏时显示编译提示面板 扩展FullscreenPanelBase增加afterOpen和beforeClose钩子 添加CompilingTip面板相关资源和脚本
This commit is contained in:
@@ -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
|
||||||
@@ -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="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"]
|
[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://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://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://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"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_12otr"]
|
||||||
|
|
||||||
@@ -328,3 +329,7 @@ layout_mode = 1
|
|||||||
visible = false
|
visible = false
|
||||||
z_index = 2
|
z_index = 2
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
|
|
||||||
|
[node name="CompilingTip" parent="root/panels" instance=ExtResource("15_scul2")]
|
||||||
|
visible = false
|
||||||
|
layout_mode = 1
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 365 KiB |
@@ -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
|
||||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 353 KiB |
@@ -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
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
@tool
|
||||||
|
extends FullscreenPanelBase
|
||||||
|
|
||||||
|
func afterOpen(_args: Array = []):
|
||||||
|
UIState.closeCurrentPanel()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://dubab2jnii6et
|
||||||
@@ -65,7 +65,7 @@ func startSingleplayerGame():
|
|||||||
MultiplayerState.playerName = playerNameInput.text
|
MultiplayerState.playerName = playerNameInput.text
|
||||||
EntityBase.generatePlayer(playerNameInput.text)
|
EntityBase.generatePlayer(playerNameInput.text)
|
||||||
WorldManager.rootNode.spawnWave(Vector2.ZERO)
|
WorldManager.rootNode.spawnWave(Vector2.ZERO)
|
||||||
UIState.closeCurrentPanel()
|
UIState.setPanel("CompilingTip")
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
historyStack = Composables.useHistoryStack(playerNameInput)
|
historyStack = Composables.useHistoryStack(playerNameInput)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ class_name FullscreenPanelBase
|
|||||||
@onready var animator = $"%animator"
|
@onready var animator = $"%animator"
|
||||||
|
|
||||||
func hidePanel():
|
func hidePanel():
|
||||||
|
beforeClose()
|
||||||
animator.play("hide")
|
animator.play("hide")
|
||||||
await animator.animation_finished
|
await animator.animation_finished
|
||||||
visible = false
|
visible = false
|
||||||
@@ -14,9 +15,14 @@ func showPanel(args: Array = []):
|
|||||||
visible = true
|
visible = true
|
||||||
animator.play("show")
|
animator.play("show")
|
||||||
await animator.animation_finished
|
await animator.animation_finished
|
||||||
|
afterOpen(args)
|
||||||
|
|
||||||
# 钩子
|
# 钩子
|
||||||
func beforeOpen(_args: Array = []):
|
func beforeOpen(_args: Array = []):
|
||||||
pass
|
pass
|
||||||
|
func afterOpen(_args: Array = []):
|
||||||
|
pass
|
||||||
|
func beforeClose():
|
||||||
|
pass
|
||||||
func afterClose():
|
func afterClose():
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user