mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat: 添加水晶和钻石物品系统
- 在EntityBase中新增水晶和钻石物品类型 - 敌人在死亡时概率掉落水晶,BOSS额外掉落钻石 - 游戏结束时将水晶和钻石存入OutGameStorage - 调整Starter面板中钻石升级成本为0 - 在UI场景中添加水晶和钻石显示节点
This commit is contained in:
@@ -172,7 +172,7 @@ func beforeOpen(_args: Array = []):
|
||||
for field in OutGameStorage.upgradableFieldsAdvance:
|
||||
var fieldShow = ComponentManager.getUIComponent("FieldShow").instantiate() as FieldShow
|
||||
fieldShow.cost(ItemStore.ItemType.CRYSTAL, 50)
|
||||
fieldShow.cost(ItemStore.ItemType.DIAMOND, 1)
|
||||
fieldShow.cost(ItemStore.ItemType.DIAMOND, 0)
|
||||
fieldShow.upgradable = true
|
||||
fieldShow.upgradeValue = OutGameStorage.upgradableFieldsAdvance[field]
|
||||
fieldShow.field = field
|
||||
@@ -182,8 +182,12 @@ func beforeOpen(_args: Array = []):
|
||||
func(newValue: float):
|
||||
OutGameStorage.upgradableFieldsValue[fieldShow.field] = newValue
|
||||
for index in len(fieldShow.costCounts):
|
||||
fieldShow.costCounts[index] *= GameRule.outGameUpgradeMultipiler
|
||||
if fieldShow.costCounts[index] == 0:
|
||||
fieldShow.costCounts[index] += 1
|
||||
else:
|
||||
fieldShow.costCounts[index] *= GameRule.outGameUpgradeMultipiler
|
||||
)
|
||||
upgradeFieldsBox.add_child(fieldShow)
|
||||
|
||||
startSingleplayerBtn.disabled = false
|
||||
Wave.current = 0
|
||||
|
||||
Reference in New Issue
Block a user