mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(角色系统): 重构角色生成和升级系统
- 在EntityBase.gd中修改角色生成逻辑,使用FeedCardBase初始化角色属性 - 调整OutGameStorage.gd中的升级字段初始值和成本配置 - 在ComponentManager.gd中添加抽象组件管理功能 - 更新Rooster.tscn的默认武器为ChainGun - 在Starter.gd中优化升级界面刷新逻辑,提取rebuildInfo方法 - 在MakeFeed.gd中添加feed卡片重建功能
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
extends Node
|
||||
class_name ComponentManager
|
||||
|
||||
static var abstracts = {}
|
||||
static var bullets = {}
|
||||
static var characters = {}
|
||||
static var weapons = {}
|
||||
@@ -16,6 +17,8 @@ static var fieldTextures = {}
|
||||
static var itemTextures = {}
|
||||
|
||||
static func init():
|
||||
for i in DirTool.listdir("res://components/Abstracts"):
|
||||
abstracts[DirTool.getBasenameWithoutExtension(i)] = load(i)
|
||||
for i in DirTool.listdir("res://components/Bullets"):
|
||||
bullets[DirTool.getBasenameWithoutExtension(i)] = load(i)
|
||||
for i in DirTool.listdir("res://components/Characters"):
|
||||
@@ -40,6 +43,9 @@ static func init():
|
||||
fieldTextures[DirTool.getBasenameWithoutExtension(i)] = load(i)
|
||||
for i in DirTool.listdir("res://resources/items"):
|
||||
itemTextures[DirTool.getBasenameWithoutExtension(i)] = load(i)
|
||||
|
||||
static func getAbstract(t: String) -> PackedScene:
|
||||
return MathTool.priority(abstracts.get(t, false), load("res://components/Abstracts/%s.tscn" % t))
|
||||
static func getBullet(t: String) -> PackedScene:
|
||||
return MathTool.priority(bullets.get(t, false), load("res://components/Bullets/%s.tscn" % t))
|
||||
static func getCharacter(t: String) -> PackedScene:
|
||||
|
||||
Reference in New Issue
Block a user