mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
3698127345
实现草墙障碍物系统,包括以下主要变更: - 新增草墙障碍物资源、脚本和场景 - 添加障碍物状态显示UI - 扩展组件管理器支持障碍物类型 - 修改子弹系统以支持对障碍物的碰撞检测 - 调整实体碰撞层设置 - 为公鸡角色添加草墙武器 新增功能允许玩家放置可阻挡敌人的草墙障碍物,并显示其生命值状态
62 lines
1.7 KiB
Plaintext
62 lines
1.7 KiB
Plaintext
[gd_scene load_steps=7 format=3 uid="uid://copkyentuuxpt"]
|
|
|
|
[ext_resource type="Script" uid="uid://dkt4yqm0juwic" path="res://scripts/Statemachine/ObstacleStateBar.gd" id="1_a6rqj"]
|
|
[ext_resource type="PackedScene" uid="uid://d1ulrvupa76ap" path="res://components/UI/ColorBar.tscn" id="2_vl2cs"]
|
|
|
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_w56p2"]
|
|
bg_color = Color(0, 0, 0, 0.5)
|
|
|
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2sar3"]
|
|
bg_color = Color(1, 0, 0, 0.5)
|
|
|
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_i0t67"]
|
|
bg_color = Color(0, 1, 0, 0.5)
|
|
|
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jxamg"]
|
|
bg_color = Color(1, 1, 1, 1)
|
|
|
|
[node name="ObstacleStateBar" type="Node2D"]
|
|
script = ExtResource("1_a6rqj")
|
|
|
|
[node name="health" parent="." instance=ExtResource("2_vl2cs")]
|
|
unique_name_in_owner = true
|
|
offset_left = -50.0
|
|
offset_top = -5.0
|
|
offset_right = 50.0
|
|
offset_bottom = 5.0
|
|
backBox = SubResource("StyleBoxFlat_w56p2")
|
|
middleBox1 = SubResource("StyleBoxFlat_2sar3")
|
|
middleBox2 = SubResource("StyleBoxFlat_i0t67")
|
|
frontBox = SubResource("StyleBoxFlat_jxamg")
|
|
|
|
[node name="levelLabel" type="HBoxContainer" parent="health"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 1
|
|
anchors_preset = -1
|
|
anchor_left = 0.5
|
|
anchor_top = -2.0
|
|
anchor_right = 0.5
|
|
anchor_bottom = -2.0
|
|
offset_left = -25.0
|
|
offset_top = -4.0
|
|
offset_right = 26.0
|
|
offset_bottom = 20.0
|
|
grow_horizontal = 2
|
|
alignment = 1
|
|
|
|
[node name="current" type="Label" parent="health/levelLabel"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_vertical = 8
|
|
text = "0"
|
|
|
|
[node name="separator" type="Label" parent="health/levelLabel"]
|
|
layout_mode = 2
|
|
text = "/"
|
|
|
|
[node name="max" type="Label" parent="health/levelLabel"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_vertical = 8
|
|
text = "100"
|