mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-30 07:12:29 +08:00
feat(UI): 添加游戏开始界面和难度选择功能
实现游戏开始界面,包含难度选择滑块和开始按钮 修改游戏规则初始难度为10并调整掉落物品数量计算 添加游戏开始条件检查,确保运行时间超过3秒且没有敌人时显示制作饲料界面
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://c0r1i5tdbwljj"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://d3qojeqa3difn" path="res://components/Abstracts/FullscreenPanelBase.tscn" id="1_o0yse"]
|
||||
[ext_resource type="Script" path="res://scripts/Contents/Panels/Starter.gd" id="2_ic0aq"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_ch0dv"]
|
||||
font_size = 45
|
||||
outline_size = 2
|
||||
|
||||
[node name="Starter" instance=ExtResource("1_o0yse")]
|
||||
offset_top = 0.0
|
||||
offset_bottom = 0.0
|
||||
script = ExtResource("2_ic0aq")
|
||||
|
||||
[node name="wrapper" parent="content" index="1"]
|
||||
theme_override_constants/separation = 30
|
||||
|
||||
[node name="title" type="Label" parent="content/wrapper" index="0"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
text = "公鸡大战狗熊"
|
||||
label_settings = SubResource("LabelSettings_ch0dv")
|
||||
|
||||
[node name="starter" type="VBoxContainer" parent="content/wrapper" index="1"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="diffs" type="HBoxContainer" parent="content/wrapper/starter" index="0"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="tip" type="Label" parent="content/wrapper/starter/diffs" index="0"]
|
||||
layout_mode = 2
|
||||
text = "选择难度:"
|
||||
|
||||
[node name="diffEdit" type="HSlider" parent="content/wrapper/starter/diffs" index="1"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(100, 0)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
max_value = 10.0
|
||||
value = 1.0
|
||||
|
||||
[node name="levelShow" type="Label" parent="content/wrapper/starter/diffs" index="2"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "1/10"
|
||||
|
||||
[node name="startBtn" type="Button" parent="content/wrapper/starter" index="1"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
text = "开始"
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=24 format=3 uid="uid://dfwg750a47ggx"]
|
||||
[gd_scene load_steps=25 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" path="res://scripts/Statemachine/UIState.gd" id="1_f00a6"]
|
||||
@@ -13,6 +13,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://cksonrrx38k36" path="res://components/Scenes/FullscreenPanels/Pause.tscn" id="12_jkm6o"]
|
||||
[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"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_12otr"]
|
||||
|
||||
@@ -310,3 +311,8 @@ offset_bottom = 0.0
|
||||
[node name="Thanks" parent="root/panels" instance=ExtResource("14_gp8lx")]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
|
||||
[node name="Starter" parent="root/panels" instance=ExtResource("14_pjwgj")]
|
||||
visible = false
|
||||
z_index = 2
|
||||
layout_mode = 1
|
||||
|
||||
Reference in New Issue
Block a user