1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00

feat(障碍物系统): 添加草墙障碍物及相关功能

实现草墙障碍物系统,包括以下主要变更:
- 新增草墙障碍物资源、脚本和场景
- 添加障碍物状态显示UI
- 扩展组件管理器支持障碍物类型
- 修改子弹系统以支持对障碍物的碰撞检测
- 调整实体碰撞层设置
- 为公鸡角色添加草墙武器

新增功能允许玩家放置可阻挡敌人的草墙障碍物,并显示其生命值状态
This commit is contained in:
2026-01-27 20:52:26 +08:00
parent 2f2a3fd04b
commit 3698127345
22 changed files with 400 additions and 18 deletions
@@ -8,6 +8,7 @@ static var weapons = {}
static var summons = {}
static var effects = {}
static var feeds = []
static var obstacles = {}
static var uiComponents = {}
static var themes = {}
static var fieldTextures = {}
@@ -26,6 +27,8 @@ static func init():
effects[DirTool.getBasenameWithoutExtension(i)] = load(i)
for i in DirTool.listdir("res://components/Feeds"):
feeds.append(load(i))
for i in DirTool.listdir("res://components/Obstacles"):
obstacles[DirTool.getBasenameWithoutExtension(i)] = load(i)
for i in DirTool.listdir("res://components/UI"):
uiComponents[DirTool.getBasenameWithoutExtension(i)] = load(i)
for i in DirTool.listdir("res://themes"):
@@ -48,6 +51,8 @@ static func getFeed(i: int) -> PackedScene:
if i >= 0 and i < feeds.size():
return feeds[i]
return null
static func getObstacle(t: String) -> PackedScene:
return MathTool.priority(obstacles.get(t, false), load("res://components/Obstacles/%s.tscn" % t))
static func getUIComponent(t: String) -> PackedScene:
return MathTool.priority(uiComponents.get(t, false), load("res://components/UI/%s.tscn" % t))
static func getTheme(t: String) -> Theme: