仓库组件 + 防御塔升级

- `PlayerInventoryComponent`:玩家库存组件,收集金币/组件/防御塔等道具
- 补全防御塔的升级逻辑,最高 5 级
This commit is contained in:
SepComet
2026-03-02 19:50:12 +08:00
parent 5ba94828a8
commit daba9cbdf9
20 changed files with 753 additions and 138 deletions
@@ -98,10 +98,12 @@ namespace GeometryTD.UI
switch (userData.ClickObjectType)
{
case CombatSelectClickObjectType.Foundation:
_useCase.SetUpgradeVisible(true);
_useCase.ShowForFoundation(userData.ContentPosition);
break;
case CombatSelectClickObjectType.Tower:
_useCase.SetUpgradePrice(userData.UpgradeCost);
_useCase.SetUpgradeVisible(!userData.IsTowerAtMaxLevel);
_useCase.SetDestroyGain(userData.DestroyGain);
_useCase.ShowForTower(userData.ContentPosition);
break;
@@ -133,6 +135,7 @@ namespace GeometryTD.UI
return null;
}
_useCase.SetUpgradeVisible(true);
_useCase.ShowForFoundation(contentPosition);
return OpenUI(_useCase.TryRefresh());
}
@@ -146,6 +149,7 @@ namespace GeometryTD.UI
}
_useCase.SetUpgradePrice(upgradeCost);
_useCase.SetUpgradeVisible(true);
_useCase.SetDestroyGain(destroyGain);
_useCase.ShowForTower(contentPosition);
return OpenUI(_useCase.TryRefresh());