mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-02 09:21:54 +08:00
feat(召唤系统): 实现彩虹旗召唤物及相关功能
添加SummonBase作为召唤物基类,实现LGBTFlag召唤物 修改LGBTWeapon从发射子弹改为召唤彩虹旗 在ComponentManager中添加召唤物管理功能 更新公鸡角色预设使用彩虹旗武器
This commit is contained in:
@@ -374,7 +374,19 @@ func useItem(items: Dictionary):
|
||||
func getItem(items: Dictionary):
|
||||
for item in items:
|
||||
inventory[item] = clamp(inventory[item] + items[item], 0, inventoryMax[item])
|
||||
func summon(who: PackedScene, syncFields: bool = true, lockValue: bool = true) -> SummonBase:
|
||||
var instance: SummonBase = who.instantiate()
|
||||
instance.myMaster = self
|
||||
if isPlayer(): instance.add_to_group("players")
|
||||
if syncFields:
|
||||
if lockValue:
|
||||
instance.fields = fields.duplicate()
|
||||
else:
|
||||
instance.fields = fields
|
||||
get_parent().add_child(instance)
|
||||
return instance
|
||||
|
||||
# 关于追踪
|
||||
func getTrackingAnchor() -> Vector2:
|
||||
return hurtbox.get_node("hitbox").global_position
|
||||
|
||||
|
||||
Reference in New Issue
Block a user